<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-37481028</atom:id><lastBuildDate>Tue, 09 Jun 2026 06:37:41 +0000</lastBuildDate><category>Software</category><category>Videojuegos</category><category>Bases de datos</category><category>Visual Basic .net</category><category>Avisos de ocasión</category><category>C</category><category>C#</category><category>C++</category><category>Photoshop</category><category>Visual Basic 6.0</category><category>Java</category><category>Humor</category><category>Hardware</category><category>Sitios Güev</category><category>Word</category><category>Flash</category><category>Fotos</category><category>SQL</category><category>Dreamweaver</category><category>AppInventor</category><category>Redes</category><category>Unity</category><category>SQL Server</category><category>Virus</category><category>ADO</category><category>Monogame</category><category>Algoritmos</category><category>Android Studio</category><category>Cosas verdes</category><category>Diseño gráfico</category><category>Google</category><category>Historia</category><category>Karel</category><category>Python</category><category>Tecnología Educativa</category><category>Excel</category><category>Movie Maker</category><category>TICs</category><category>GDI+</category><category>Libros</category><category>PowerPoint</category><category>Comunicación</category><category>Freehand</category><category>Fireworks</category><category>Formulario</category><category>ImageReady</category><category>Meme</category><category>Sistemas Operativos</category><category>Casos de Estudio</category><category>MySQL</category><title>El Tony y sus ondas...</title><description>Programación, comunicación, diseño, videojuegos y el más allá...</description><link>http://tony-valderrama.blogspot.com/</link><managingEditor>noreply@blogger.com (Tony Valderrama)</managingEditor><generator>Blogger</generator><openSearch:totalResults>444</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-9046261377532805735</guid><pubDate>Sun, 01 Feb 2026 04:39:00 +0000</pubDate><atom:updated>2026-01-31T22:46:05.552-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Hardware</category><category domain="http://www.blogger.com/atom/ns#">Redes</category><category domain="http://www.blogger.com/atom/ns#">Software</category><title>Servidor de medios en una laptop vieja</title><description>&lt;p&gt;Hace unos días se me ocurrió la idea de usar una laptop vieja en la casa para algo útil. Y me crucé con un video de alguien que sugería convertirlo en un servidor de medios para la casa, o sea como tu propio Netflix.&lt;/p&gt;&lt;p&gt;Buscando opciones, me decidí por usar Ubuntu (Linux) Desktop como sistema operativo (probé con el Ubuntu Server, pero me fue muy complicado) y Jellyfin (el que administra los medios).&lt;/p&gt;&lt;p&gt;&lt;b&gt;Advertencia&lt;/b&gt;: por primera vez en la historia de este blog, estoy copiando una entrada hecha con IA (solo le arreglé algunos detalles para que fuera más claro y/o sencillo). Me atrevo a hacerlo porque, cuando hice este proyecto, le iba preguntando paso a paso, corrigiendo errores, etc. Y espero que te sea muy útil.&lt;/p&gt;&lt;p&gt;Los pasos que vienen aquí van a mostrar cómo...&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;instalar Ubuntu Desktop&lt;/li&gt;&lt;li&gt;conectarte a internet (por cable o Wi-Fi)&lt;/li&gt;&lt;li&gt;evitar que la laptop se “duerma” al cerrar la tapa&lt;/li&gt;&lt;li&gt;instalar Jellyfin usando Docker (la forma más segura)&lt;/li&gt;&lt;li&gt;organizar tus películas y series&lt;/li&gt;&lt;li&gt;copiar archivos desde otra computadora&lt;/li&gt;&lt;li&gt;entrar a Jellyfin desde una computadora y desde una TV Roku&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Qué necesitas antes de empezar&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Una laptop vieja (funciona incluso con 4 GB de RAM)&lt;/li&gt;&lt;li&gt;Un USB de 8 GB o más&lt;/li&gt;&lt;li&gt;Otra computadora con internet&lt;/li&gt;&lt;li&gt;Conexión a tu red (Ethernet o Wi-Fi)&lt;/li&gt;&lt;li&gt;Televisión con Roku (opcional)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Instalar Ubuntu Desktop&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Ubuntu es un sistema operativo gratuito, parecido a Windows, pero más ligero.&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Descargar Ubuntu&lt;/b&gt;&lt;/p&gt;Desde la otra computadora:&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Ve a: &lt;a href=&quot;https://ubuntu.com/download/desktop&quot;&gt;https://ubuntu.com/download/desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Descarga Ubuntu Desktop (LTS)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Crear el USB de instalación:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;En Windows o macOS puedes usar Rufus&lt;/li&gt;&lt;li&gt;Descarga Rufus: &lt;a href=&quot;https://rufus.ie/es/&quot;&gt;https://rufus.ie/es/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Inserta el USB&lt;/li&gt;&lt;li&gt;Selecciona:&lt;/li&gt;&lt;li&gt;Imagen: el archivo .iso de Ubuntu&lt;/li&gt;&lt;li&gt;Destino: tu USB&lt;/li&gt;&lt;li&gt;Presiona Start.&amp;nbsp;&lt;b&gt;CUIDADO&lt;/b&gt;: esto borra el USB completamente.&lt;/li&gt;&lt;li&gt;Arranca la laptop desde el USB&lt;/li&gt;&lt;li&gt;Conecta el USB a la laptop vieja&lt;/li&gt;&lt;li&gt;Enciéndela&lt;/li&gt;&lt;li&gt;Presiona repetidamente una de estas teclas (depende del modelo):&lt;/li&gt;&lt;ul&gt;&lt;li&gt;F12, F10, ESC, DEL&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Elige arrancar desde el USB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Instalar Ubuntu&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Cuando aparezca Ubuntu:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Elige Install Ubuntu&lt;/li&gt;&lt;li&gt;Idioma: Español&lt;/li&gt;&lt;li&gt;Teclado: Español (Latinoamericano)&lt;/li&gt;&lt;li&gt;Conéctate a internet si puedes&lt;/li&gt;&lt;li&gt;Tipo de instalación: Borrar disco e instalar Ubuntu&lt;/li&gt;&lt;li&gt;Crea tu usuario y contraseña. Ojo: guárdala, la usarás mucho&lt;/li&gt;&lt;li&gt;Cuando termine, reinicia y quita el USB.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Conectarse a internet&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Con Ethernet (cable):&amp;nbsp;&lt;/b&gt;Solo conecta el cable. Ubuntu se conecta solo.&lt;/p&gt;&lt;div&gt;&lt;b&gt;Con Wi-Fi:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Arriba a la derecha haz clic en el icono de red&lt;/li&gt;&lt;li&gt;Elige tu Wi-Fi&lt;/li&gt;&lt;li&gt;Escribe la contraseña&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;La Terminal&lt;/h2&gt;&lt;div&gt;La Terminal es donde se escriben los comandos. Para terminar el resto de la instalación, se hará con comandos escritos aquí. No es necesario entender todas a la perfección para que esto funcione y te sugiero copiar y pegarlos para que te sea más sencillo.&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Para abrirla:&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Presiona Ctrl + Alt + T&lt;/li&gt;&lt;li&gt;Aparece una ventana negra&lt;/li&gt;&lt;li&gt;También puedes buscar la aplicación Terminal con las aplicaciones de Ubuntu&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Evitar que la laptop se suspenda al cerrar la tapa&lt;/h2&gt;&lt;div&gt;Esto va a permitir que cierres la laptop sin que se suspenda.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;En la termina escribe esto: &lt;span style=&quot;font-family: courier;&quot;&gt;sudo nano /etc/systemd/logind.conf&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Te pedirá tu contraseña (no se ve al escribir, es normal)&lt;/li&gt;&lt;li&gt;Busca esta línea: &lt;span style=&quot;font-family: courier;&quot;&gt;#HandleLidSwitch=suspend&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Cámbiala por esto: &lt;span style=&quot;font-family: courier;&quot;&gt;HandleLidSwitch=ignore&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Guarda el archivo: Ctrl + O → Enter&lt;/li&gt;&lt;li&gt;Salir del editor: Ctrl + X&lt;/li&gt;&lt;li&gt;Reinicia la laptop: &lt;span style=&quot;font-family: courier;&quot;&gt;sudo reboot&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Ahora puedes cerrar la tapa sin que se apague.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Instalar Docker&amp;nbsp;&lt;/h2&gt;&lt;div&gt;Docker permite instalar programas con menos problemas.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Escribe los siguientes comandos en la terminal para instalar y activar Docker, y para simplificar su uso. El último va a resetear la lap:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo apt update&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo apt install docker.io -y&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo systemctl enable docker&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo systemctl start docker&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo usermod -aG docker $USER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo reboot&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Una vez que reinicie la lap, entra a la terminal y escribe:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo apt install docker-compose -y&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Crear la estructura de carpetas&lt;/h2&gt;&lt;div&gt;Jellyfin necesita carpetas para organizar los archivos.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;En la terminal:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;mkdir -p ~/jellyfin/config&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;mkdir -p ~/media/movies&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;mkdir -p ~/media/series&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;mkdir -p ~/media/music&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Y esto a a crear una estructura como ésta:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;/home/tuusuario/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;├── jellyfin/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;│&amp;nbsp; &amp;nbsp;└── config/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;└── media/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; ├── movies/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; ├── series/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; └── music/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Crear el archivo docker-compose.yml&lt;/h2&gt;&lt;div&gt;Esto va a servir para configurar Jellyfin.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Con estos comandos vas a entrar a la carpeta indicada y abrir el archivo de configuración:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;cd ~/jellyfin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;nano docker-compose.yml&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pega esto en el archivo:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;version: &quot;3.8&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;services:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; jellyfin:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; image: jellyfin/jellyfin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; container_name: jellyfin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; ports:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - &quot;8096:8096&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; volumes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - ./config:/config&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - ~/media:/media&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; restart: unless-stopped&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Guarda todo y sal del editor (Ctrl + O, Enter, Ctrl + X).&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Iniciar Jellyfin&lt;/h2&gt;&lt;div&gt;Docker descargará Jellyfin y lo iniciará. Escribe esto en la terminal:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;docker-compose up -d&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Asignar un nombre al servidor&lt;/h2&gt;&lt;div&gt;Esto va a hacer que conectarse al servidor sea más fácil. Escribe estos comandos en la terminal:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo apt install avahi-daemon -y&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo hostnamectl set-hostname jellyfin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo reboot&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;El último comando reinicia el servidor. Al terminal puedes buscar tu servidor en la red como jellyfin.local.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Entrar a Jellyfin desde una computadora&lt;/h2&gt;&lt;div&gt;Desde otra computadora en la misma red:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Abre el navegador&lt;/li&gt;&lt;li&gt;Escribe en la barra de direcciones: &lt;span style=&quot;font-family: courier;&quot;&gt;http://jellyfin.local:8096&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Sigue el asistente:&lt;/li&gt;&lt;li&gt;Crea usuario&lt;/li&gt;&lt;li&gt;Idioma&lt;/li&gt;&lt;li&gt;Agrega carpetas:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Películas: &lt;span style=&quot;font-family: courier;&quot;&gt;/media/movies&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Series: &lt;span style=&quot;font-family: courier;&quot;&gt;/media/series&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Música: &lt;span style=&quot;font-family: courier;&quot;&gt;/media/music&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Copiar películas desde otra computadora&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Aquí vamos a usar un software llamada Samba para copiar archivos en una red.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Instalar Samba&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Escribir en la terminal: &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo apt install samba -y&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Compartir la carpeta de medios&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Vamos a editar el archivo de configuración: &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo nano /etc/samba/smb.conf&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Baja hasta el final del archivo (con la flecha abajo) y pega esto al final:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;[Media]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;path = /home/tuusuario/media&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;browseable = yes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;read only = no&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;writable = yes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;guest ok = no&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;create mask = 0775&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;directory mask = 0775&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;IMPORTANTE: Cambia &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;tuusuario&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; por tu nombre de usuario real de Ubuntu.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Por ejemplo, si tu usuario es &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;tony&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;, quedaría así:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;path = /home/tony/media&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Guardar los cambios: Ctrl + O, Enter, Ctrl + X&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Crear un usuario de Samba&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Windows necesita usuario y contraseña para conectarse. Vamos a usar el mismo usuario que usas en Ubuntu.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;En la terminal: &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo smbpasswd -a tuusuario&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Por ejemplo: &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo smbpasswd -a tony&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Escribe una contraseña&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Confírmala&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;No tiene que ser la misma que la de Ubuntu, pero es más fácil si lo es.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Para que el servidor esté listo para recibir archivos, escribe:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;sudo systemctl restart smbd&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Conectarse desde Windows&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Abre Explorador de archivos&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;En la barra de direcciones escribe: &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;\\jellyfin.local&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; y presiona Enter.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Si no funciona, intenta sin &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;.local&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Si eso falla, presiona Windows+R, escribe&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;\\jellyfin.local&lt;/span&gt;&amp;nbsp;y presiona Enter.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Windows te pedirá:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Usuario: tuusuario&lt;/li&gt;&lt;li&gt;Contraseña: la que pusiste con smbpasswd&lt;/li&gt;&lt;li&gt;Marca: Recordar mis credenciales&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Esto debería abrir una ventana del explorador con la carpeta Media de tu servidor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Copiar archivos&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Abre otra ventana del Explorador&lt;/li&gt;&lt;li&gt;Busca tus películas o series&lt;/li&gt;&lt;li&gt;Arrástralas a la carpeta correcta:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Películas a &lt;span style=&quot;font-family: courier;&quot;&gt;movies&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Series a &lt;span style=&quot;font-family: courier;&quot;&gt;series&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Música a &lt;span style=&quot;font-family: courier;&quot;&gt;music&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Ver los archivos en Jellyfin&lt;/h2&gt;&lt;div&gt;Jellyfin detecta los archivos automáticamente, pero si no aparecen:&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Desde un navegador de internet, escribe lo siguiente en la barra de direcciones: &lt;span style=&quot;font-family: courier;&quot;&gt;http://jellyfin.local:8096&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;Ve a:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Dashboard&lt;/li&gt;&lt;li&gt;Libraries&lt;/li&gt;&lt;li&gt;Escanear biblioteca&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Y luego espera un ratito.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Ver Jellyfin en una TV Roku&lt;/h2&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;En las apps, busca Jellyfin&lt;/li&gt;&lt;li&gt;Instala la app&lt;/li&gt;&lt;li&gt;Cuando te pida el servidor escribe: &lt;span style=&quot;font-family: courier;&quot;&gt;http://jellyfin.local:8096&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Inicia sesión y listo&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2026/01/servidor-de-medios-en-una-laptop-vieja.html</link><author>noreply@blogger.com (Tony Valderrama)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-4368538847007825792</guid><pubDate>Thu, 14 Nov 2024 01:52:00 +0000</pubDate><atom:updated>2024-11-13T19:55:50.552-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Word</category><title>Citando APA en Word</title><description>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpEY5O_f27vhUVvNbMb9eSbZqwIWdqsT7jJusO1Pmwz2R3IZyLKecj8AcapxZ2iGp-dbBBNYaoZfeqCewVItWMHvnGStdUpA6On5BG3AyjDjpiI13P8uxU4TlvOUiw9iM-1mWf-T4QsED4bqLVe4biNEg7__0fpIAD7YBE_maE7sVUsSMXa7K/s355/apa.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;355&quot; data-original-width=&quot;325&quot; height=&quot;95&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpEY5O_f27vhUVvNbMb9eSbZqwIWdqsT7jJusO1Pmwz2R3IZyLKecj8AcapxZ2iGp-dbBBNYaoZfeqCewVItWMHvnGStdUpA6On5BG3AyjDjpiI13P8uxU4TlvOUiw9iM-1mWf-T4QsED4bqLVe4biNEg7__0fpIAD7YBE_maE7sVUsSMXa7K/w87-h95/apa.png&quot; width=&quot;87&quot; /&gt;&lt;/a&gt;&lt;/div&gt;En esta entrada de mi blog voy a describir algo que me hubiera sido muy valioso cuando estaba estudiante, pero ahora Word lo incluye como una función que te puede ahorrar mucho trabajo al citar textos desde un documento.&lt;p&gt;&lt;/p&gt;&lt;p&gt;Citar fuentes es fundamental en cualquier trabajo académico, ya que da crédito a los autores originales y permite a otros verificar y consultar las fuentes que sustentan lo que estás escribiendo. ¿Imagínate que te quemaste las pestañas investigando y generando un trabajo muy bien hecho para que otro llegue y solo le dé Copy-Paste y lo entregue como si él lo hubiera hecho? Eso se llama plagio y en ambientes académicos es un crimen que puede acabar con tu carrera. Al citar correctamente, evitamos el plagio y mostramos respeto por el esfuerzo intelectual de otros. Hay muchos formatos para citar, pero el más usado (o por lo menos el que más he visto) es el &lt;a href=&quot;https://es.wikipedia.org/wiki/Estilo_APA&quot; target=&quot;_blank&quot;&gt;APA&lt;/a&gt;. Éste u otro sistema de cita da claridad y uniformidad a los trabajos académicos, lo cual es importantísimo.&lt;/p&gt;&lt;p&gt;Hay muchas páginas que te pueden generar citas y bibliografía en formato APA, pero aquí te voy a mostrar cómo hacerlo en Word. Me parece que está más fácil tener todo integrado en un solo lugar en lugar de andar copiando y pegando entre la página y mi documento. Además, Word no solo te da el formato a lo que citas sino que maneja las referencias, lo cual te facilita la vida al añadir, gestionar y dar formato a las citas, evitando errores y ahorrando tiempo. Con esta herramienta, podrás centrarte en el contenido y no en lo latoso que es recordar las reglas de cómo citar correctamente.&lt;/p&gt;&lt;p&gt;Aquí te dejo un paso a paso para usar el manejador de referencias en Word para citar en formato APA.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Configura el estilo de cita:&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Abre tu documento de Word.&lt;/li&gt;&lt;li&gt;Ve a la pestaña &lt;strong&gt;Referencias&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;En el grupo de &quot;Citas y Bibliografía&quot;, selecciona &lt;strong&gt;Estilo&lt;/strong&gt; y elige &lt;strong&gt;APA&lt;/strong&gt; en el menú desplegable.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj46ih9Wmh2HPsL9TbkLij-qZhjvKmz9hoPwNNHkd4aJM0U1hFRiH7WS0Cix4ElBTY7cl4C5sSesgL70FlVsTX2T83os9DpeE6s__bIctl4xFDILfpayGusYarP7SuFmxpRy6G6Z22DATrtHKE2KxxUxovAOzmPP5i7tjXnW6iOnsPDWcga6_NT/s549/01.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;179&quot; data-original-width=&quot;549&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj46ih9Wmh2HPsL9TbkLij-qZhjvKmz9hoPwNNHkd4aJM0U1hFRiH7WS0Cix4ElBTY7cl4C5sSesgL70FlVsTX2T83os9DpeE6s__bIctl4xFDILfpayGusYarP7SuFmxpRy6G6Z22DATrtHKE2KxxUxovAOzmPP5i7tjXnW6iOnsPDWcga6_NT/s320/01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;display: inline; text-align: left;&quot;&gt;&lt;strong&gt;Añadir una Cita:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Coloca el cursor en el lugar del documento donde deseas insertar la cita.&lt;/li&gt;&lt;li&gt;En la pestaña &lt;strong&gt;Referencias&lt;/strong&gt;, selecciona &lt;strong&gt;Insertar Cita&lt;/strong&gt; &amp;gt; &lt;strong&gt;Agregar nueva fuente…&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEGcGgGEiHULr3tckccJGJkhvZtY4sGY7Hhn-rzpeU0M4r5jBOoEWrMOuVozzhdebdMippQzgL9CexxIn_se_o1bSZZqZULfiDGRUVaynMnK3DbaIGnU-kUz4Iz-UAjPfitxwzCU_JAuGynrEkUGdnAmuZkP2qTNZfdwFNZuaRE-J59y_0sgv/s610/02.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;234&quot; data-original-width=&quot;610&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEGcGgGEiHULr3tckccJGJkhvZtY4sGY7Hhn-rzpeU0M4r5jBOoEWrMOuVozzhdebdMippQzgL9CexxIn_se_o1bSZZqZULfiDGRUVaynMnK3DbaIGnU-kUz4Iz-UAjPfitxwzCU_JAuGynrEkUGdnAmuZkP2qTNZfdwFNZuaRE-J59y_0sgv/s320/02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Aparecerá una ventana de &quot;Crear fuente&quot;, donde deberás ingresar la información de la fuente, como el autor, título, año de publicación, etc. Recuerda de elegir el tipo de publicación del que se trata antes de llenar la información porque el formato cambia si es libro, sección de un libro, artículo, etc. Si no te sabes todos los datos (que deberías), llena los que sepas.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHxdXHB9gRkulPFHks0b2-yqhD7l9cJ_iGivcysEifeF8WlVS0MVRl36zOf2yVTndAwFrN0B8ECvNmTgkc5Th7Gu2A3bRvLAqsijWT4Itc2jp02Nruw5q3_1Vzu3xEo6Mj4ACOTDUYKBnwaWdFnbx-NTDsiDF91mTaL_ru-KAJJlw4HnOaj4xl/s949/03.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;389&quot; data-original-width=&quot;949&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHxdXHB9gRkulPFHks0b2-yqhD7l9cJ_iGivcysEifeF8WlVS0MVRl36zOf2yVTndAwFrN0B8ECvNmTgkc5Th7Gu2A3bRvLAqsijWT4Itc2jp02Nruw5q3_1Vzu3xEo6Mj4ACOTDUYKBnwaWdFnbx-NTDsiDF91mTaL_ru-KAJJlw4HnOaj4xl/s320/03.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Después de completar los campos, haz clic en &lt;strong&gt;Aceptar&lt;/strong&gt;. Word insertará la cita en el lugar indicado.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS0M9BN1Kl9Xlbis35JBY7Ib1Vc8DLx8YG8_Aa02ZjVGIY7aLMeiMR_4BLDkWy30jUfFxph7iQ6szTIqEO9hBifUkKgJI6-qGgnjxrfBdJAqGe7U4rmb42t22DI2ABZl37pb1sK2zBK0J8EUHK1JXNgV3LPL4ObTMcvXj5O8ofj91nEmdY1X9_/s840/04.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;289&quot; data-original-width=&quot;840&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS0M9BN1Kl9Xlbis35JBY7Ib1Vc8DLx8YG8_Aa02ZjVGIY7aLMeiMR_4BLDkWy30jUfFxph7iQ6szTIqEO9hBifUkKgJI6-qGgnjxrfBdJAqGe7U4rmb42t22DI2ABZl37pb1sK2zBK0J8EUHK1JXNgV3LPL4ObTMcvXj5O8ofj91nEmdY1X9_/s320/04.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;strong style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;strong style=&quot;text-align: left;&quot;&gt;Gestionar Fuentes:&lt;/strong&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Si necesitas modificar o revisar alguna de las fuentes, selecciona &lt;strong&gt;Administrador de fuentes&lt;/strong&gt; en la pestaña &lt;strong&gt;Referencias&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54Q1HspuXWTGTjxEFi-Z8T986w0Nr6qgIZN_nfrdg8jLqLfthvsRlOjYhthP8LhQrOmO_JBsp4xnoHgoo7XMYsCWIbAjkZzvB_WpBYz6gYtogatdwp-rc6nnVK83vLEMJqC2H2e6ij98azIpCRKTEN26ksIip5tM8MvXAD_8YL_xbeb4mrfCG/s506/05.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;173&quot; data-original-width=&quot;506&quot; height=&quot;109&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54Q1HspuXWTGTjxEFi-Z8T986w0Nr6qgIZN_nfrdg8jLqLfthvsRlOjYhthP8LhQrOmO_JBsp4xnoHgoo7XMYsCWIbAjkZzvB_WpBYz6gYtogatdwp-rc6nnVK83vLEMJqC2H2e6ij98azIpCRKTEN26ksIip5tM8MvXAD_8YL_xbeb4mrfCG/s320/05.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Aquí puedes editar, eliminar o agregar nuevas fuentes a tu lista.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ_UU9ofdGNkJfCJMa_Q9PKuVsW7IFYSiBwuZyhVkQNCfW5Ut5XpuOkz7pGw2P98F2YNuj1b8jIxA7RHwZkNmFWAr5r2y3cf2xxz2giryZW8XWf6ioTtJNwWj01FsBNeTQ0sl56mZe8Fn5zA3MFnHdpnegAEQQv-CKJk9lXMo5P4sl0_S-fXDO/s1053/06.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;612&quot; data-original-width=&quot;1053&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ_UU9ofdGNkJfCJMa_Q9PKuVsW7IFYSiBwuZyhVkQNCfW5Ut5XpuOkz7pGw2P98F2YNuj1b8jIxA7RHwZkNmFWAr5r2y3cf2xxz2giryZW8XWf6ioTtJNwWj01FsBNeTQ0sl56mZe8Fn5zA3MFnHdpnegAEQQv-CKJk9lXMo5P4sl0_S-fXDO/s320/06.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;display: inline; text-align: left;&quot;&gt;&lt;strong&gt;Citar de Nuevo la Misma Fuente:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Para citar una fuente que ya has usado, coloca el cursor donde deseas insertar la cita.&lt;/li&gt;&lt;li&gt;Selecciona &lt;strong&gt;Insertar Cita&lt;/strong&gt; y elige la fuente correspondiente de la lista.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiILYkfzQWQkwwglQ8e9pMhxR1jlcrhQrYiwtwfiPFVMvx030hLMbLgRjwwvfrF3LkFgjt4CzVMhykTQXqBacBW8dUyU2jIcovrNL09ZSa8JF4UtMgoAM2xc-DIBHDgY1fTFLkU7AgubM98u-bZJ7OhkK3dLI08yHxXO_kyAXj8DDSB5cVzWEfq/s805/07.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;437&quot; data-original-width=&quot;805&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiILYkfzQWQkwwglQ8e9pMhxR1jlcrhQrYiwtwfiPFVMvx030hLMbLgRjwwvfrF3LkFgjt4CzVMhykTQXqBacBW8dUyU2jIcovrNL09ZSa8JF4UtMgoAM2xc-DIBHDgY1fTFLkU7AgubM98u-bZJ7OhkK3dLI08yHxXO_kyAXj8DDSB5cVzWEfq/s320/07.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;display: inline; text-align: left;&quot;&gt;&lt;strong&gt;Crear la Bibliografía:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Una vez que hayas insertado todas las citas, es hora de agregar la bibliografía.&lt;/li&gt;&lt;li&gt;Coloca el cursor al final del documento o en la página donde deseas crear la bibliografía.&lt;/li&gt;&lt;li&gt;En la pestaña &lt;strong&gt;Referencias&lt;/strong&gt;, selecciona &lt;strong&gt;Bibliografía&lt;/strong&gt; y elige el estilo &quot;Bibliografía&quot; o &quot;Referencias&quot;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ42bKzH3s5c3uOlmdUnGnOJJF0dc56DVJpLFvaY21Kgl7xtwQKDzbOnB9UPg2AOs1yrYjn5Wu3rXypZv_E2ZJhjQRqKwOqd0QCZPHH3TlUmwNWqGh-S6tK-cDweckwPIYxYWI4sVR6YCe2YzkxiuLHXVM-wCnswSJGvmA8OsFX0PqQHBU2z2y/s817/08.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;756&quot; data-original-width=&quot;817&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ42bKzH3s5c3uOlmdUnGnOJJF0dc56DVJpLFvaY21Kgl7xtwQKDzbOnB9UPg2AOs1yrYjn5Wu3rXypZv_E2ZJhjQRqKwOqd0QCZPHH3TlUmwNWqGh-S6tK-cDweckwPIYxYWI4sVR6YCe2YzkxiuLHXVM-wCnswSJGvmA8OsFX0PqQHBU2z2y/s320/08.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Word generará automáticamente una lista de todas las fuentes que has citado, en formato APA.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvPEvcWkw8SUU7wEYs3VJbDOFmHYfat8DlqqOxY4J9eGhM2uGOtB8iDW0IrXn5gFO9fTTSz3dMyXkmhHF2BMbIkCetYrfXySxG6h39I9RYtmGC7XkulzUpj8FKq92kZGEfA10572hIHG1o00zrf1wKEosU6QIhEUqW4cSRBsLTyw-AjGVEspxd/s865/09.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;376&quot; data-original-width=&quot;865&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvPEvcWkw8SUU7wEYs3VJbDOFmHYfat8DlqqOxY4J9eGhM2uGOtB8iDW0IrXn5gFO9fTTSz3dMyXkmhHF2BMbIkCetYrfXySxG6h39I9RYtmGC7XkulzUpj8FKq92kZGEfA10572hIHG1o00zrf1wKEosU6QIhEUqW4cSRBsLTyw-AjGVEspxd/s320/09.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Espero que este material te pueda ayudar en tus estudios presentes y futuros. ¡Saludos!&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;* Imagen de APA tomado de la página de&amp;nbsp;&lt;a href=&quot;https://firmacjar.com/normas-apa-estandarizacion-academica/&quot; target=&quot;_blank&quot;&gt;firmacjar&lt;/a&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2024/11/citando-apa-en-word.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpEY5O_f27vhUVvNbMb9eSbZqwIWdqsT7jJusO1Pmwz2R3IZyLKecj8AcapxZ2iGp-dbBBNYaoZfeqCewVItWMHvnGStdUpA6On5BG3AyjDjpiI13P8uxU4TlvOUiw9iM-1mWf-T4QsED4bqLVe4biNEg7__0fpIAD7YBE_maE7sVUsSMXa7K/s72-w87-h95-c/apa.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-3370382784731618355</guid><pubDate>Mon, 11 Nov 2024 17:16:00 +0000</pubDate><atom:updated>2024-11-11T11:17:50.740-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>La Guía (más o menos) Completa del SELECT</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj23eH_KR7tWkf0ytIJ0AW3RErW9Z-M814ddqkJ5sVK7DZgt8aIdiqTLQiUzyZaGWSYHb9NyYU6uctCiR-UdSt51niWl8S6EILgMBaGbHEH-NTPbwk8LXOKEdanBs2kTHGWe1NYkJ_b3jIDBAKxUR50QqQn1Cg18yq0od2RmqA-y2Tkj52mHyVP/s1019/looking.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;677&quot; data-original-width=&quot;1019&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj23eH_KR7tWkf0ytIJ0AW3RErW9Z-M814ddqkJ5sVK7DZgt8aIdiqTLQiUzyZaGWSYHb9NyYU6uctCiR-UdSt51niWl8S6EILgMBaGbHEH-NTPbwk8LXOKEdanBs2kTHGWe1NYkJ_b3jIDBAKxUR50QqQn1Cg18yq0od2RmqA-y2Tkj52mHyVP/w200-h133/looking.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Hace mucho tiempo escribí sobre cómo usar la instrucción SELECT de &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/SQL&quot; target=&quot;_blank&quot;&gt;SQL&lt;/a&gt;. Como son muchos mensajes, aquí pongo un índice para que te sea más sencillo aprender muchas de las variantes que tiene el SELECT. Si estás aprendiendo a usar esta instrucción, te sugiero que los veas en orden (al cabo que cada uno es muy corto). ¡Ojalá te sea de utilidad!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-el-tremento-select-parte-1-el.html&quot; target=&quot;_blank&quot;&gt;SQL: El tremento SELECT, parte 1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-el-tremendo-select-parte-2-usando.html&quot; target=&quot;_blank&quot;&gt;SQL: El tremendo SELECT, parte 2 - Usando el WHERE para decidir con quien&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-el-tremendo-select-parte-3-el-where.html&quot; target=&quot;_blank&quot;&gt;SQL: El tremendo SELECT parte 3 - El WHERE continúa&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-el-tremendo-select-parte-4-el-where.html&quot; target=&quot;_blank&quot;&gt;SQL: El tremendo SELECT parte 4 - el WHERE se encadena&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-el-tremendo-select-parte-5-lo-lgico.html&quot; target=&quot;_blank&quot;&gt;SQL: El tremendo SELECT parte 5 - Lo lógico de lo ilógico&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-select-parte-6-ests-in-o-solo-te.html&quot; target=&quot;_blank&quot;&gt;SQL: SELECT, parte 6 - ¿Estás IN o solo te encuentras entre muchos? ¿O acaso no existes?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-select-parte-7-ordenando-el-caos-ya.html&quot;&gt;SQL: SELECT, parte 7 - Ordenando el Caos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/11/sql-select-parte-8-eliminando-los.html&quot; target=&quot;_blank&quot;&gt;SQL: SELECT, parte 8 - Eliminando a los repetidos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2006/12/sql-select-parte-9-cambiando-nombres-si.html&quot; target=&quot;_blank&quot;&gt;SQL: SELECT parte 9 - Cambiando nombres&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2007/04/arrejuntando-datos-hace-tiempo-que.html&quot; target=&quot;_blank&quot;&gt;Arrejuntando datos&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Aunque no es del SELECT te sugiero que veas la entrada llamada &quot;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2008/02/jugando-con-tablas-normalizadas-y-sql.html&quot; target=&quot;_blank&quot;&gt;Jugando con tablas normalizadas y SQL&lt;/a&gt;&quot; para que veas como combiné varias instrucciones SQL.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Imagen tomada de la página &lt;a href=&quot;https://www.hotpepper.ca/blog/2018/06/06/5-alternatives-you-can-use-instead-of-look-at-2/&quot;&gt;hotpepper.com&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2024/11/la-guia-mas-o-menos-completa-del-select.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj23eH_KR7tWkf0ytIJ0AW3RErW9Z-M814ddqkJ5sVK7DZgt8aIdiqTLQiUzyZaGWSYHb9NyYU6uctCiR-UdSt51niWl8S6EILgMBaGbHEH-NTPbwk8LXOKEdanBs2kTHGWe1NYkJ_b3jIDBAKxUR50QqQn1Cg18yq0od2RmqA-y2Tkj52mHyVP/s72-w200-h133-c/looking.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-1538277284712274774</guid><pubDate>Thu, 22 Feb 2024 03:57:00 +0000</pubDate><atom:updated>2024-02-21T22:04:13.071-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Python: diccionarios</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ8oEtFoOh9y0CE8SEfVv1jiYR9lamOC7MZdtQQsXDUteBqwtCB1eqYRUGfqtoV617ujjqU3nttpePRM7fx7PBoao0lQDOo1zUgvYSoyXjU0sdXYlA3H6-YK94kMO60zcHrrIUEE4SxOySudQCv5m0ciw1Lf6XMkCt_FZ_6ihofW8iXBPGSye2/s200/diccionario.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;100&quot; data-original-width=&quot;200&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ8oEtFoOh9y0CE8SEfVv1jiYR9lamOC7MZdtQQsXDUteBqwtCB1eqYRUGfqtoV617ujjqU3nttpePRM7fx7PBoao0lQDOo1zUgvYSoyXjU0sdXYlA3H6-YK94kMO60zcHrrIUEE4SxOySudQCv5m0ciw1Lf6XMkCt_FZ_6ihofW8iXBPGSye2/s1600/diccionario.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;En este post voy a explicar cómo usar diccionarios en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;. El diccionario es un &lt;a href=&quot;https://en.wikipedia.org/wiki/Hash_table#:~:text=In%20computing%2C%20a%20hash%20table,that%20maps%20keys%20to%20values.&quot; target=&quot;_blank&quot;&gt;Hash Table&lt;/a&gt; (algo que &lt;a href=&quot;https://tony-valderrama.blogspot.com/2021/03/hashmaps-en-java.html&quot; target=&quot;_blank&quot;&gt;expliqué aquí&lt;/a&gt; de cómo usarlo en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot; target=&quot;_blank&quot;&gt;Java&lt;/a&gt;). Como he hecho en las últimas explicaciones que he hecho de &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;, aquí les dejo el video que explica todo y después va el código que aparece en el video.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/pnVQJE2OuFg?si=PRQFuL0CXhfRkJ1-&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3678103.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3678104.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3678105.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que te haya sido de utilidad. ¡Saludos!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;P.D. La imagen que usé la tomé de &lt;a href=&quot;https://concepto.de/diccionario/&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;.&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2024/02/python-diccionarios.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ8oEtFoOh9y0CE8SEfVv1jiYR9lamOC7MZdtQQsXDUteBqwtCB1eqYRUGfqtoV617ujjqU3nttpePRM7fx7PBoao0lQDOo1zUgvYSoyXjU0sdXYlA3H6-YK94kMO60zcHrrIUEE4SxOySudQCv5m0ciw1Lf6XMkCt_FZ_6ihofW8iXBPGSye2/s72-c/diccionario.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-8511858293670095706</guid><pubDate>Sun, 18 Feb 2024 18:25:00 +0000</pubDate><atom:updated>2024-02-18T12:25:18.128-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Python: funciones</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhRX6I2P_LqqeeOxRVHN1GM2rvlkyS8z8H38uxO3ma5ZdyOXwCxiQUCnZm4HBb4b2qyc4RIDedWgfS7-ko4MBIsn1gkfhHJBx5be7LwH_tNTJ0Jrsjia-ESwcwlFtDIBYaZvekB8ZinStMOXrsuclnOqrOSj-7EL6t7XRnQmUGL9YISoHkcDDR/s151/01.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;151&quot; data-original-width=&quot;150&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhRX6I2P_LqqeeOxRVHN1GM2rvlkyS8z8H38uxO3ma5ZdyOXwCxiQUCnZm4HBb4b2qyc4RIDedWgfS7-ko4MBIsn1gkfhHJBx5be7LwH_tNTJ0Jrsjia-ESwcwlFtDIBYaZvekB8ZinStMOXrsuclnOqrOSj-7EL6t7XRnQmUGL9YISoHkcDDR/s1600/01.png&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Hace tiempo expliqué cómo usar &lt;a href=&quot;https://tony-valderrama.blogspot.com/2009/07/funciones-funcionales-en-c.html&quot; target=&quot;_blank&quot;&gt;funciones en C&lt;/a&gt; y en &lt;a href=&quot;https://tony-valderrama.blogspot.com/2008/02/cmo-funcionan-las-funciones.html&quot; target=&quot;_blank&quot;&gt;Visual Basic 6&lt;/a&gt;. No voy a ahondar en qué son las funciones ni para que sirven. Más bien, voy a mostrar como usarlas y definirlas en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;La explicación la puedes encontrar en el siguiente video y después pongo el código que expliqué en el video.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;PRÓXIMAMENTE ESTARÁ AQUÍ EL VIDEO&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3675325.js&quot;&gt;&lt;/script&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3675326.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3675327.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3675328.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
</description><link>http://tony-valderrama.blogspot.com/2024/02/python-funciones.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhRX6I2P_LqqeeOxRVHN1GM2rvlkyS8z8H38uxO3ma5ZdyOXwCxiQUCnZm4HBb4b2qyc4RIDedWgfS7-ko4MBIsn1gkfhHJBx5be7LwH_tNTJ0Jrsjia-ESwcwlFtDIBYaZvekB8ZinStMOXrsuclnOqrOSj-7EL6t7XRnQmUGL9YISoHkcDDR/s72-c/01.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-4281239570259620907</guid><pubDate>Fri, 16 Feb 2024 15:09:00 +0000</pubDate><atom:updated>2024-03-04T07:44:02.767-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Python: ciclos o iteraciones</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9s1NSe0SaMIjdce9cODdzECGe56b88SvhQ-4pBXP2bILNi1IDx13V4fKz7GWlS_hVRSGkAxlWWKUZxYTx6hrqK1HAfPBu9yPViiOB3zMuVb0igfb9GUlf3wNPvjIOCvkoRuwr65JxIbkiMRja-Ip56LlAuMdQE6p4QLtQrmfVK02NxAthtGU1/s150/repeat.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;148&quot; data-original-width=&quot;150&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9s1NSe0SaMIjdce9cODdzECGe56b88SvhQ-4pBXP2bILNi1IDx13V4fKz7GWlS_hVRSGkAxlWWKUZxYTx6hrqK1HAfPBu9yPViiOB3zMuVb0igfb9GUlf3wNPvjIOCvkoRuwr65JxIbkiMRja-Ip56LlAuMdQE6p4QLtQrmfVK02NxAthtGU1/s1600/repeat.png&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/div&gt;En todo lenguaje de programación es necesario permitir que las cosas se repitan y &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt; no es la excepción. Básicamente tenemos dos ciclos: el &lt;i&gt;while&lt;/i&gt; que es igual al de otros lenguajes de programación y el &lt;i&gt;for&lt;/i&gt; que nos permite recorrer listas.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;En el siguiente video les explico cómo funciona con unos ejemplos y después del video viene el código fuente que usé.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/LSBzpZJ5UU0?si=nzq-v4NIh47I4iru&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Y aquí está el código fuente de los ejemplos que aparecen en el video:&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674976.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674979.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674980.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Espero que les sea de utilidad esta explicación ¡Saludos!&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;P.D. Imagen tomada del &lt;a href=&quot;https://www.kochiesbusinessbuilders.com.au/the-secret-to-successful-marketing-repeat-repeat-repeat/&quot; target=&quot;_blank&quot;&gt;éste sitio&lt;/a&gt;.&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2024/02/python-ciclos-o-iteraciones.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9s1NSe0SaMIjdce9cODdzECGe56b88SvhQ-4pBXP2bILNi1IDx13V4fKz7GWlS_hVRSGkAxlWWKUZxYTx6hrqK1HAfPBu9yPViiOB3zMuVb0igfb9GUlf3wNPvjIOCvkoRuwr65JxIbkiMRja-Ip56LlAuMdQE6p4QLtQrmfVK02NxAthtGU1/s72-c/repeat.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-6337719514890371373</guid><pubDate>Thu, 15 Feb 2024 03:36:00 +0000</pubDate><atom:updated>2024-02-15T22:12:17.345-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Python: condiciones</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVh3A6IFgo0cV6F06Wjzng-Aa1MgJMjct_LeSub5DYxZ1L8wmhS5vebMbCHw7TBjVthq_4v0DBSZAH0hisTBwFWERDQoGpJCg2rNzq1AWTVkahf4KPYLT4wZUbeXQGdfNelyqqPB09FlqFJbfTrmSsRw_Q4DO3cDxVd5zvWWTlBbb4LgCRJukW/s150/shutterstock_106645070.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;127&quot; data-original-width=&quot;150&quot; height=&quot;127&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVh3A6IFgo0cV6F06Wjzng-Aa1MgJMjct_LeSub5DYxZ1L8wmhS5vebMbCHw7TBjVthq_4v0DBSZAH0hisTBwFWERDQoGpJCg2rNzq1AWTVkahf4KPYLT4wZUbeXQGdfNelyqqPB09FlqFJbfTrmSsRw_Q4DO3cDxVd5zvWWTlBbb4LgCRJukW/s1600/shutterstock_106645070.png&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/div&gt;En cualquier lenguaje de programación, es necesario que el programa sea capaz de tomar decisiones. Ya he escrito &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/01/condiciones-en-c-el-gato-20.html&quot; target=&quot;_blank&quot;&gt;cómo usarlas en C&lt;/a&gt;&amp;nbsp;y son casi iguales en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%2B%2B&quot; target=&quot;_blank&quot;&gt;C++&lt;/a&gt;, &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot;&gt;Java&lt;/a&gt; y &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%23&quot;&gt;C#&lt;/a&gt;, entre otros. Pero en éste video te voy a mostrar cómo usarlas en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;En éste video te explico, con varios ejemplos, cómo se pueden usar condiciones en este lenguaje. Nota de aclaración: no existe un equivalente a la instrucción &lt;i&gt;switch &lt;/i&gt;que tenemos en otros lenguajes. Dicho esto, aquí está el video.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/CgmRVWYSn6k?si=z6MKMfDwtj25K4Bf&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Y aquí pongo el código de los ejemplos que se mostraron en el video:&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674098.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674099.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3674100.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Espero que esto les haya servido. En la siguiente ocasión, hablaremos de funciones. ¡Hasta la próxima!&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Imagen tomada del &lt;a href=&quot;https://utel.mx/blog/10-consejos-para/consejos-para-tomar-decisiones/&quot; target=&quot;_blank&quot;&gt;Blog de UTel&lt;/a&gt;.&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2024/02/python-condiciones.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVh3A6IFgo0cV6F06Wjzng-Aa1MgJMjct_LeSub5DYxZ1L8wmhS5vebMbCHw7TBjVthq_4v0DBSZAH0hisTBwFWERDQoGpJCg2rNzq1AWTVkahf4KPYLT4wZUbeXQGdfNelyqqPB09FlqFJbfTrmSsRw_Q4DO3cDxVd5zvWWTlBbb4LgCRJukW/s72-c/shutterstock_106645070.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-3882181890732683025</guid><pubDate>Wed, 14 Feb 2024 04:26:00 +0000</pubDate><atom:updated>2024-02-13T22:37:22.639-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Python: instalación y conceptos básicos</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;Hace tiempo quise empezar a escribir sobre cómo programar con &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;. Hice un post de &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/09/instalando-python.html&quot; target=&quot;_blank&quot;&gt;cómo instalarlo&lt;/a&gt; (lo cual me arrepiento porque en ese post usaba el intérprete de Python y un editor de texto llamado &lt;a href=&quot;https://brackets.io/&quot; target=&quot;_blank&quot;&gt;Brackets&lt;/a&gt;. Pero después empecé a usar &lt;a href=&quot;https://code.visualstudio.com/&quot; target=&quot;_blank&quot;&gt;Visual Studio Code&lt;/a&gt; que es mucho mejor, desde mi punto de vista).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;También escribí cómo &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/10/generando-numeros-al-azar-en-python.html&quot; target=&quot;_blank&quot;&gt;generar números aleatorios&lt;/a&gt;, pero en lugar de brincar de tema en tema, quiero empezar desde cero (aunque rapidito) y con este post empiezo.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Así que hice este video donde les indico cómo instalar Python con Visual Studio Code y muestro un programa de ejemplo que usa variables, operadores, instrucciones de entrada (&lt;span style=&quot;font-family: courier;&quot;&gt;input&lt;/span&gt;) y de salida (&lt;span style=&quot;font-family: courier;&quot;&gt;print&lt;/span&gt;). Abajo del video pongo el código de este&amp;nbsp; ejemplo.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para instalar Python, éstas son las ligas que aparecen en el video: sitio para descargar el &lt;a href=&quot;https://www.python.org/&quot; target=&quot;_blank&quot;&gt;intérprete de Python&lt;/a&gt; y la descarga de &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;Visual Studio Code&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí está el video:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/P7zJ2ThMW30?si=GY3HVJ7PncWbmNt7&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Y éste es el código del ejemplo:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/3673663.js&quot;&gt;&lt;/script&gt;Í&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que les haya sido de utilidad. Espero pronto poner la siguiente parte, donde hablaré de condiciones. ¡Hasta la próxima!&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2024/02/python-instalacion-y-conceptos-basicos.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/P7zJ2ThMW30/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-6779833945513628328</guid><pubDate>Tue, 28 Nov 2023 01:23:00 +0000</pubDate><atom:updated>2023-12-11T21:00:52.619-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>La encriptadera en C#</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwCBiqM4rx8yCCJhfwz3HBFg5B4GdOO6XmMaQhgLopWovNvPVJpeEoZOnQX41nXlTZxkjJNDrTAwlcfuC9SV8OidreX74kPhEe0xeR339oAJhq5x7ny9Pzm2_bIKNx_lvRVcIKrQ7xxstT2eVyj3DZ45lFgdaRulf3-eNUBH2V3exuWixVz4_5/s134/encrypt.png&quot; style=&quot;clear: left; display: inline; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;100&quot; data-original-width=&quot;134&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwCBiqM4rx8yCCJhfwz3HBFg5B4GdOO6XmMaQhgLopWovNvPVJpeEoZOnQX41nXlTZxkjJNDrTAwlcfuC9SV8OidreX74kPhEe0xeR339oAJhq5x7ny9Pzm2_bIKNx_lvRVcIKrQ7xxstT2eVyj3DZ45lFgdaRulf3-eNUBH2V3exuWixVz4_5/s16000/encrypt.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Los datos son importantes y, como programadores, es nuestro deber mantenerlos seguros. En este post en mi blog voy a explicar cómo usar algunos métodos de la librería&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;System.Security.Cryptography&lt;/span&gt; para encriptar y desencriptar datos de texto.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Hice un programa que lo ejemplifica (pongo todo le código al final), pero como dijo &lt;a href=&quot;https://es.wikipedia.org/wiki/Jack_el_Destripador&quot; target=&quot;_blank&quot;&gt;Jack el Destripador&lt;/a&gt;, vámonos por partes.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Al principio debo importar la librería&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;System.Security.Cryptography&amp;nbsp;&lt;/span&gt;para que todo esto funcione. Por eso al principio del programa lo incluyo con el using:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;using System.Security.Cryptography;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Pero esto no basta para que funcione. Para que tu programa pueda hacer uso de las clases y objetos de esta librería, se tiene que incluir al proyecto una referencia al framework que contiene lo de seguridad. En su proyecto, hagan clic derecho en la ventana de su solución donde dice referencias, como se ve en esta imagen:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM5CKxchjfI-Xe3Uq9yslFwvIyqDRXdURC57GH0qOLgd3vrQYFzwif3U1fvau4l11NNwJAS0wEOpaEhcZHGbUpO52iQ2MGmxO-q9V4NWdu6_fF9jEXfJG9nqs2uozJIspsWDlsYwdiSQRxdk4wfNc2UaYoTb_HouIx-_hU7asV-l9ZmHO9Y00g/s339/01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;330&quot; data-original-width=&quot;339&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM5CKxchjfI-Xe3Uq9yslFwvIyqDRXdURC57GH0qOLgd3vrQYFzwif3U1fvau4l11NNwJAS0wEOpaEhcZHGbUpO52iQ2MGmxO-q9V4NWdu6_fF9jEXfJG9nqs2uozJIspsWDlsYwdiSQRxdk4wfNc2UaYoTb_HouIx-_hU7asV-l9ZmHO9Y00g/w200-h195/01.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Del menú contextual que aparece, seleccionen &lt;span style=&quot;font-family: courier;&quot;&gt;Agregar referencia...&lt;/span&gt; y aparece una ventana con todas las referencias, que por default están apareciendo las referencias de NET Framework. Allí pon una tache en la que dice &lt;span style=&quot;font-family: courier;&quot;&gt;System.Security&lt;/span&gt; como se ve en la siguiente imagen:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCFcxhLad2_LsH_gFVykWdTMr1639mVQb3FnI_kIq3JRvNfR9dUTIiMKMfwBYq-3ohl6dcZnVu7n9z3IrtEn1h61l_Ca3-Se5E5v_4KQ0H8n-6ML5uuCiS1dTVN62PnneNxCVLRN4X5LKA9IrEz0uqp7rw8rvqKWdzDmtIClrahl0D-Lrg5H6o/s986/02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;684&quot; data-original-width=&quot;986&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCFcxhLad2_LsH_gFVykWdTMr1639mVQb3FnI_kIq3JRvNfR9dUTIiMKMfwBYq-3ohl6dcZnVu7n9z3IrtEn1h61l_Ca3-Se5E5v_4KQ0H8n-6ML5uuCiS1dTVN62PnneNxCVLRN4X5LKA9IrEz0uqp7rw8rvqKWdzDmtIClrahl0D-Lrg5H6o/w400-h277/02.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El método &lt;span style=&quot;font-family: courier;&quot;&gt;encriptar&lt;/span&gt;&amp;nbsp;toma una cadena (&lt;span style=&quot;font-family: courier;&quot;&gt;textoNormal&lt;/span&gt;) y un arreglo de bytes opcional (&lt;span style=&quot;font-family: courier;&quot;&gt;entropia&lt;/span&gt;) para agregar aleatoriedad al proceso de encriptación. Convierte el texto a bytes y utiliza el método &lt;span style=&quot;font-family: courier;&quot;&gt;ProtectedData.Protect&lt;/span&gt; para encriptar los datos. El resultado es un arreglo de bytes que representa el texto encriptado. Éste es el código simplificado:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3625255.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;El método &lt;span style=&quot;font-family: courier;&quot;&gt;desecriptar&lt;/span&gt;&amp;nbsp;toma un arreglo de bytes (&lt;span style=&quot;font-family: courier;&quot;&gt;bytesEncriptados&lt;/span&gt;) y un arreglo de bytes opcional (&lt;span style=&quot;font-family: courier;&quot;&gt;entropia&lt;/span&gt;). Desencripta los datos utilizando el método &lt;span style=&quot;font-family: courier;&quot;&gt;ProtectedData.Unprotect&lt;/span&gt; y convierte los bytes resultantes de nuevo a una cadena utilizando la &lt;a href=&quot;https://es.wikipedia.org/wiki/UTF-8&quot; target=&quot;_blank&quot;&gt;codificación UTF-8&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3625256.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Y hacer clic en el botón solo agarra el texto que está en la caja de texto, lo encripte, muestra el arreglo de bytes encriptados en una etiqueta, desencripta el arreglo de bytes y muestra el resultado en otra etiqueta.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Pero antes de mostrar el código, ¿qué hace &lt;span style=&quot;font-family: courier;&quot;&gt;ProtectedData.Protect&lt;/span&gt;? Ésta función permite tomar información y convertirla en una forma que es difícil de entender para cualquier persona que no tenga la clave adecuada para descifrarla.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Al usarlo le proporcionas la información que deseas cifrar (por ejemplo, una contraseña) y, opcionalmente, también puedes proporcionar algo llamado &quot;entropía&quot;. La entropía es como agregar un toque adicional de aleatoriedad para hacer que el cifrado sea aún más seguro. Y la función devuelve los datos cifrados, que luego puedes almacenar de forma segura en tu aplicación o base de datos.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Y &lt;span style=&quot;font-family: courier;&quot;&gt;ProtectedData.Unprotect&lt;/span&gt; es una función en C# que hace el proceso inverso de lo que hace &lt;span style=&quot;font-family: courier;&quot;&gt;ProtectedData.Protect&lt;/span&gt;. Es decir, toma datos cifrados (información que ha sido previamente encriptada) y los descifra para devolverlos a su forma original o legible.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ahora sí, aquí va el código completo:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3625257.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que les haya sido de utilidad. ¡Saludos!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;P.D. La imagen de encripción al principio del post fue tomada de este sitio:&amp;nbsp;&lt;a href=&quot;https://www.pcworld.com/article/540005/what-is-encryption.html&quot;&gt;https://www.pcworld.com/article/540005/what-is-encryption.html&lt;/a&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2023/11/la-encriptadera-en-c.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwCBiqM4rx8yCCJhfwz3HBFg5B4GdOO6XmMaQhgLopWovNvPVJpeEoZOnQX41nXlTZxkjJNDrTAwlcfuC9SV8OidreX74kPhEe0xeR339oAJhq5x7ny9Pzm2_bIKNx_lvRVcIKrQ7xxstT2eVyj3DZ45lFgdaRulf3-eNUBH2V3exuWixVz4_5/s72-c/encrypt.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-3832516690819748497</guid><pubDate>Tue, 14 Nov 2023 18:58:00 +0000</pubDate><atom:updated>2023-11-14T12:58:47.618-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Archivos CSV en C#</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiX7wnzxxoGsGa26yIC-8n2rTBXxw1JpXUe7dXpxKHuSI9nZsD_rJ_qMUN4PtC1P1mD8zFerz-bopenx8gCzlJYZ13gTWPAlrqjMWrvtGhRAZA8dnGwzMPoQPEku9ETP7YeY15WFaT9sLIBlU78pAL-oWplInMTwyTwstna9v-n7ABIhgbr4JE/s80/csv.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;80&quot; data-original-width=&quot;77&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiX7wnzxxoGsGa26yIC-8n2rTBXxw1JpXUe7dXpxKHuSI9nZsD_rJ_qMUN4PtC1P1mD8zFerz-bopenx8gCzlJYZ13gTWPAlrqjMWrvtGhRAZA8dnGwzMPoQPEku9ETP7YeY15WFaT9sLIBlU78pAL-oWplInMTwyTwstna9v-n7ABIhgbr4JE/s16000/csv.png&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los archivos de texto siguen siendo de mucha utilidad (como comentaba en mi post anterior sobre &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/11/archivos-de-texto-en-c.html&quot;&gt;archivos txt en C++&lt;/a&gt;). Pero son aún más útiles si con CSV (para una explicación completa sobre archivos CSV, haz clic &lt;a href=&quot;https://es.wikipedia.org/wiki/Valores_separados_por_comas&quot; target=&quot;_blank&quot;&gt;aquí&lt;/a&gt;). Y en este post te voy a platicar cómo crearlos en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%23&quot; target=&quot;_blank&quot;&gt;C#&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En resumidas cuentas, un archivo CSV es un archivo de texto que contiene datos los cuales están separados con comas (por eso CSV, comma separated values). Son muy útiles porque se abren de forma nativa en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Excel&quot; target=&quot;_blank&quot;&gt;Excel&lt;/a&gt; y desde allí puedes hacer mil cosas con los datos).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para escribir en un archivo de texto, necesitamos objetos de las clases &lt;span style=&quot;font-family: courier;&quot;&gt;StreamWriter&lt;/span&gt; (para escribir al archivo) y &lt;span style=&quot;font-family: courier;&quot;&gt;StreamReader&lt;/span&gt; (para leer datos).&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para este ejemplo, hice un nuevo proyecto Aplicación de Windows Forms (.NET Framework) e hice la siguiente interfaz:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSZusirnzk6dQrZyKcWRTzTpby5HxsNDPbGn4mDZsqTDFL2PbhVEGo9qo5ez35APem2CGKgCWYZPYkmvawIhRCmgALfjioEYcMwKdCvDwkdCW0XGh0kOnUR7wJUCgsjzch_vuDlVn1qdKo3UJlFMxAQQ_t0s_35Nw7eCFOKT_r_4QAmWkBSr3z/s525/01%20Interfaz.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;486&quot; data-original-width=&quot;525&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSZusirnzk6dQrZyKcWRTzTpby5HxsNDPbGn4mDZsqTDFL2PbhVEGo9qo5ez35APem2CGKgCWYZPYkmvawIhRCmgALfjioEYcMwKdCvDwkdCW0XGh0kOnUR7wJUCgsjzch_vuDlVn1qdKo3UJlFMxAQQ_t0s_35Nw7eCFOKT_r_4QAmWkBSr3z/s320/01%20Interfaz.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En esta ventana voy a pedir nombre, edad y semestre en cajas de texto, selecciona un tipo de bachillerato de un combobox. Abajo hay una lista donde voy a poner los alumnos registrados. Los botones tienen las siguientes funciones: agregar el alumno (sus datos están en las cajas de texto y combobox) a la lista. Otro botón va a eliminar todo lo que está en la lista. Otro botón guarda lo que está en la lista al archivo, mientras que otro lee del archivo y pone en la lista los datos tal y como están guardados. Y al final un botón para salir del programa.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Me voy a enfocar en el código que manipula el archivo (escribir datos en él y leer datos de él). Al final pongo el código completo.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Éste es el método que se encarga de guardar todo lo que está en la lista al archivo:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3621399.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí estamos abriendo el archivo para escritura en un objeto llamado &lt;i&gt;streamWriter&lt;/i&gt; (que es de la clase &lt;span style=&quot;font-family: courier;&quot;&gt;StreamWriter&lt;/span&gt;). El constructor de &lt;span style=&quot;font-family: courier;&quot;&gt;StreamWriter&lt;/span&gt; abre el archivo y se encarga de todo lo necesario. Luego hay un ciclo que va por todos los elementos de la lista, escribiendo línea por línea al archivo. Al final cierras el archivo y todos contentos.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Este es el método para leer línea por línea del archivo y ponerlo en la lista. Éste es el código:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3621400.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Empiezo eliminando todos los elementos de la lista. Luego creo el objeto &lt;span style=&quot;font-family: courier;&quot;&gt;StreamReader&lt;/span&gt; (y al crearlo abre el archivo). Con el archivo abierto, tengo un ciclo que lee línea por línea (&lt;span style=&quot;font-family: courier;&quot;&gt;EndOfStream&lt;/span&gt; me dice si llegué al final del archivo y el &lt;span style=&quot;font-family: courier;&quot;&gt;ReadLine&lt;/span&gt; lee toda una línea y devuelve un string con lo que leí). Y esa cadena lo agrego a la lista. Al terminar el ciclo, cierro el archivo y ya.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí les pongo el código de toda la ventana, esperando que sea de utilidad:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3621401.js&quot;&gt;&lt;/script&gt;
Espero que les haya sido de utilidad. ¡Hasta la próxima!</description><link>http://tony-valderrama.blogspot.com/2023/11/archivos-csv-en-c.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiX7wnzxxoGsGa26yIC-8n2rTBXxw1JpXUe7dXpxKHuSI9nZsD_rJ_qMUN4PtC1P1mD8zFerz-bopenx8gCzlJYZ13gTWPAlrqjMWrvtGhRAZA8dnGwzMPoQPEku9ETP7YeY15WFaT9sLIBlU78pAL-oWplInMTwyTwstna9v-n7ABIhgbr4JE/s72-c/csv.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-4635004615800288865</guid><pubDate>Tue, 07 Nov 2023 18:13:00 +0000</pubDate><atom:updated>2023-11-07T12:13:33.377-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Archivos de texto en C++</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyqKAT727ABDSRPXq4YvBF3NqpvyXJRYb7a01luem1l3CBWN1_kBjZiCTfHRtRaqmmrGEzVshinnCEKEzqFXH8LnH9SZIdKsaX2gOoVTWYHKFI8CAqStaNiDbVm9my2zsCsv2rZClSp6NDo2RJI0JO8mpGfERsr2G1MOK4JnEzaJO7OfLx7ooi/s125/txtFile.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;125&quot; data-original-width=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyqKAT727ABDSRPXq4YvBF3NqpvyXJRYb7a01luem1l3CBWN1_kBjZiCTfHRtRaqmmrGEzVshinnCEKEzqFXH8LnH9SZIdKsaX2gOoVTWYHKFI8CAqStaNiDbVm9my2zsCsv2rZClSp6NDo2RJI0JO8mpGfERsr2G1MOK4JnEzaJO7OfLx7ooi/s16000/txtFile.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Los archivos de texto son muy usados en estos tiempos, a pesar de que hay sistemas DBMS y mil otras cosas para almacenar datos. Pero, a pesar de todo, siguen siendo muy útiles. Y programar archivos de texto en C++ es muy sencillo y eso te voy a mostrar en este post de mi blog donde quiero mostrarte como abrir, escribir a, leer de y cerrar archivos en este lenguaje.&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Abrir un archivo&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Antes de poder hacer cualquier otra cosa, hay que abrir el archivo. Para hacerlo, utilizamos la clase &lt;span style=&quot;font-family: courier;&quot;&gt;fstream&lt;/span&gt;. Puedes abrir un archivo para escritura (&lt;span style=&quot;font-family: courier;&quot;&gt;ofstream&lt;/span&gt;), lectura (&lt;span style=&quot;font-family: courier;&quot;&gt;ifstream&lt;/span&gt;), o ambas (&lt;span style=&quot;font-family: courier;&quot;&gt;fstream&lt;/span&gt;). Aquí tienes un ejemplo de cómo abrir un archivo para escritura:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3619103.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Escritura en un archivo de texto&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ya que esté abierto el archivo, se escribe texto en él usando el operador &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; como se ve en este ejemplo:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3619104.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Leer del archivo&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Para leer desde un archivo, primero abrimos el archivo en modo lectura (&lt;span style=&quot;font-family: courier;&quot;&gt;ifstream&lt;/span&gt;) y luego usamos el operador &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; o la función &lt;span style=&quot;font-family: courier;&quot;&gt;getline&lt;/span&gt; para leer los datos. Aquí hay un ejemplo de lectura utilizando &lt;span style=&quot;font-family: courier;&quot;&gt;getline&lt;/span&gt;:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3619105.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Cerrar el archivo&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Es importante recordar cerrar el archivo una vez que hayamos terminado de trabajar con él. Esto garantiza que todos los datos se escriban o lean correctamente y que el archivo quede en un estado consistente.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Ejemplo completo&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Aquí está un ejemplo que muestra cómo abrir un archivo, escribir en él y luego leer su contenido:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3619110.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Espero que todo esto te sea útil. ¡Hasta la próxima!&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2023/11/archivos-de-texto-en-c.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyqKAT727ABDSRPXq4YvBF3NqpvyXJRYb7a01luem1l3CBWN1_kBjZiCTfHRtRaqmmrGEzVshinnCEKEzqFXH8LnH9SZIdKsaX2gOoVTWYHKFI8CAqStaNiDbVm9my2zsCsv2rZClSp6NDo2RJI0JO8mpGfERsr2G1MOK4JnEzaJO7OfLx7ooi/s72-c/txtFile.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-2273784745031601802</guid><pubDate>Tue, 24 Oct 2023 23:34:00 +0000</pubDate><atom:updated>2023-10-24T17:47:49.153-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Generando números al azar en Python</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDNQNwryO89eF3YbajG1-IOi5wnVDUpmoOo8iVZGBp1cdgZyEPx319eAMMqSUNfHGmxIz5SKyddTWmM0oH6KG2t-rzDwFuHtgj89qDWA0zdvycQMtE76I863XbgUwIFdUfmZQsbOmYOktaAv8hTrgnpaY-72jGMPuYgTdmbB30uvd4T-y8SfVL/s150/dnd%20dado.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;149&quot; data-original-width=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDNQNwryO89eF3YbajG1-IOi5wnVDUpmoOo8iVZGBp1cdgZyEPx319eAMMqSUNfHGmxIz5SKyddTWmM0oH6KG2t-rzDwFuHtgj89qDWA0zdvycQMtE76I863XbgUwIFdUfmZQsbOmYOktaAv8hTrgnpaY-72jGMPuYgTdmbB30uvd4T-y8SfVL/s16000/dnd%20dado.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Por lo menos en la programación, dejamos algunas cosas al azar. Es muy importante generar números al azar para diferentes tipos de aplicaciones, desde juegos, simulaciones y análisis de datos hasta ciberseguridad y mil aplicaciones más.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Para facilitarnos la vida, &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt; tiene un módulo, llamado &lt;span style=&quot;font-family: courier;&quot;&gt;random&lt;/span&gt;, que nos ayuda a generarlos. En este post te voy a mostrar cómo usarlo.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Antes de empezar...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Antes de poder empezar a generar números aleatorios, debes importar el módulo &lt;span style=&quot;font-family: courier;&quot;&gt;random&lt;/span&gt;. Puedes hacerlo con una simple declaración &lt;span style=&quot;font-family: courier;&quot;&gt;import&lt;/span&gt; al principio de tu programa:&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import random&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Con esto tu programa ya tiene acceso a varias funciones y clases para generar datos aleatorios, algunos de los cuales vamos a hablar más adelante.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Generando números enteros aleatorios&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;El módulo&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;random&amp;nbsp;&lt;/span&gt;proporciona la función &lt;span style=&quot;font-family: courier;&quot;&gt;randint(a, b)&lt;/span&gt; para generar un número entero aleatorio entre &lt;span style=&quot;font-family: courier;&quot;&gt;a&lt;/span&gt; y &lt;span style=&quot;font-family: courier;&quot;&gt;b&lt;/span&gt;, incluyendo ambos valores. Así es cómo puedes utilizarlo:&lt;/p&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/3614602.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
En este ejemplo, &lt;span style=&quot;font-family: courier;&quot;&gt;random.randint(1, 10)&lt;/span&gt; genera un número entero aleatorio entre 1 y 10, y el resultado se almacena en la variable &lt;span style=&quot;font-family: courier;&quot;&gt;entero_aleatorio&lt;/span&gt;. Puedes ajustar el rango para adaptarlo a tus necesidades específicas.  &lt;div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span&gt;&lt;b&gt;Generando&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;números con decimales&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;No es tan común, pero a veces necesitas generar números que tengan decimales de forma aleatoria. Para esto&amp;nbsp;puedes utilizar la función &lt;span style=&quot;font-family: courier;&quot;&gt;random.uniform(a, b)&lt;/span&gt;. Genera un número de punto flotante aleatorio entre&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;a&lt;/span&gt;&amp;nbsp;y&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;b&lt;/span&gt;. Aquí tienes un ejemplo:&lt;/p&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/3614603.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;Para terminar, les muestro el ejemplo de un programa que genera 10 números aleatorios enteros entre 5 y 30:&lt;/div&gt;&amp;nbsp;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/3614604.js&quot;&gt;&lt;/script&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier; text-align: justify;&quot;&gt;random&lt;/span&gt;&amp;nbsp;tiene muchas otras funciones en los que no me voy a meter pero que estos son los principales o más usuales. Espero que les haya sido de utilidad. ¡Hasta la próxima!&lt;/div&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2023/10/generando-numeros-al-azar-en-python.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDNQNwryO89eF3YbajG1-IOi5wnVDUpmoOo8iVZGBp1cdgZyEPx319eAMMqSUNfHGmxIz5SKyddTWmM0oH6KG2t-rzDwFuHtgj89qDWA0zdvycQMtE76I863XbgUwIFdUfmZQsbOmYOktaAv8hTrgnpaY-72jGMPuYgTdmbB30uvd4T-y8SfVL/s72-c/dnd%20dado.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-9112184728969924124</guid><pubDate>Mon, 09 Oct 2023 15:27:00 +0000</pubDate><atom:updated>2023-10-24T17:53:00.592-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Revolviendo vectores</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrHUkSJvF5ChbDWtAtrztp9De7OBhijd0M8V6m4-TpSr8WlCtklHHWOaF09warBl2uQAfKnBMZStNmLaIn8Dj5Ef84-mjm6LATie-qAsxreUK5ML-NgPLPjNxLemgjwnWFAxzYv0W5LHCDYSMee4RqdDaqJbzfqEfx_vqtBj0JD2tQHwEVZ3g/s200/Overhand3.jpg&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;200&quot; data-original-width=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrHUkSJvF5ChbDWtAtrztp9De7OBhijd0M8V6m4-TpSr8WlCtklHHWOaF09warBl2uQAfKnBMZStNmLaIn8Dj5Ef84-mjm6LATie-qAsxreUK5ML-NgPLPjNxLemgjwnWFAxzYv0W5LHCDYSMee4RqdDaqJbzfqEfx_vqtBj0JD2tQHwEVZ3g/s16000/Overhand3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El otro día estaba tratando de hacer un programa que te permite jugar &lt;a href=&quot;https://es.wikipedia.org/wiki/Blackjack&quot; target=&quot;_blank&quot;&gt;21 (Blackjack)&lt;/a&gt;, aunque no fuera de forma &quot;completa&quot;, más bien como un ejercicio del uso de vectores, clases y objetos en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%2B%2B&quot; target=&quot;_blank&quot;&gt;C++&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Uno de los problemas era revolver una baraja. Como ya he hablado de cómo &lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/08/numeros-aleatorios-en-c.html&quot; target=&quot;_blank&quot;&gt;generar números aleatorios en C++&lt;/a&gt;, pensé una forma de generar números al azar e irlos cambiando con los que están, pero supuse que debía haber una mejor manera, algo más sencillo. Y sabía que en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot; target=&quot;_blank&quot;&gt;Java&lt;/a&gt; había forma de trabajar con ArrayLists, así que me puse a buscar cómo se puede hacer en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%2B%2B&quot; target=&quot;_blank&quot;&gt;C++&lt;/a&gt;. Y sí, hay una función que me puede &quot;mezclar&quot; al azar (o pseudoazar, como hemos dicho cuando hablé de números aleatorios), e incluso &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/09/revolviendo-un-vector-en-c.html&quot; target=&quot;_blank&quot;&gt;escribí brevemente sobre cómo usarlo&lt;/a&gt;, pero aquí te explico cómo usarlo con un ejemplo más completo.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El método en cuestión es el &lt;span style=&quot;font-family: courier;&quot;&gt;random_shuffle&lt;/span&gt; y para poderlo usar, tienes que incluir la librería &amp;lt;&lt;span style=&quot;font-family: courier;&quot;&gt;algorithm&amp;gt;&lt;/span&gt;. Y necesita el uso de números aleatorios (si no sabes cómo funcionan, lee primero &lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/08/numeros-aleatorios-en-c.html&quot; target=&quot;_blank&quot;&gt;este post de mi blog&lt;/a&gt;), así que incluimos la librería &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;cstdlib&amp;gt;&lt;/span&gt; para usar el &lt;span style=&quot;font-family: courier;&quot;&gt;srand&lt;/span&gt; y el &lt;span style=&quot;font-family: courier;&quot;&gt;rand&lt;/span&gt;, y la librería &lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;ctime&amp;gt;&lt;/span&gt; para obtener la hora del sistema para inicializar el generador de números pseudoaleatorios. Así que la pura parte de la declaración, quedaría así:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3608282.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Después de esto,&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;en el &lt;span style=&quot;font-family: courier;&quot;&gt;main()&lt;/span&gt; antes en hacer cualquier otra cosa, inicializo el generador de números aleatorios con el reloj del sistema, como se ve aquí:&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3608286.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí viene una parte que va en el &lt;span style=&quot;font-family: courier;&quot;&gt;main()&lt;/span&gt; y también estoy mostrando el método de la clase &lt;span style=&quot;font-family: courier;&quot;&gt;Baraja&lt;/span&gt; (al rato pongo todo el código) que barajea (revuelve) los elementos del vector. También agrego una función, llamado &lt;span style=&quot;font-family: courier;&quot;&gt;myrandom,&lt;/span&gt;&amp;nbsp;que no pertenece a ninguna clase, que genera los números aleatorios para ser usados en el método &lt;span style=&quot;font-family: courier;&quot;&gt;random_shuffle&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí pongo el código completo. El archivo tiene una clase &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Carta&lt;/b&gt;&lt;/span&gt; que guarda el palo (corazones, trébol, etc.), el valor o rango (As, 2, 3, etc) y si está visible o no. Tiene un constructor que recibe dos cadenas (palo y rango) y métodos para voltear una carta, devolver los datos de una carta, saber si está visible o no y para devolver el valor (rango).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Luego tiene una clase &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Baraja&lt;/b&gt;&lt;/span&gt; que tiene un vector de objetos &lt;span style=&quot;font-family: courier;&quot;&gt;Carta&lt;/span&gt;, un constructor que inicializa el vector con todas las cartas de una baraja inglesa (para eso hay un par de arreglos para ayudar a inicializar) y métodos que te devuelve una carta (y lo quita del vector), para barajear la carta (lo que mostré en el código anterior), para imprimir todas las cartas en la baraja, y una que nos indica si la baraja está vacía o no.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;También hay una clase &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Jugador&lt;/b&gt;&lt;/span&gt; que tiene las manos de cada jugador: guarda un vector de tipo &lt;span style=&quot;font-family: courier;&quot;&gt;Carta&lt;/span&gt; y una cadena con el nombre del jugador. No tiene constructor y tiene métodos para Agregar una carta al vector del jugador, devolver el número de cartas que tiene, mostrar sus cartas, asignar un nombre al jugador y para mostrar el nombre del jugador.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El &lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;main()&lt;/span&gt;&lt;/b&gt; declara una &lt;span style=&quot;font-family: courier;&quot;&gt;Baraja&lt;/span&gt; y un vector de Jugador, inicializa la baraja (con un código que mostré con anterioridad), pide número de jugadores, pide las cartas para cada jugador, revisa si alguien ganó justo después de repartir las cartas (poco probable, pero hay que revisar) e inicia un ciclo donde muestra cartas del jugador y le pregunta si desea otra carta, revisa si perdió o si ganó. Si nadie ha ganado, al final determina el ganador (el que más cera esté de sumar 21).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Con esa explicación, ahora sí les dejo el código completo del programa, esperando que les sea de utilidad. ¡Saludos!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3608288.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;</description><link>http://tony-valderrama.blogspot.com/2023/10/revolviendo-vectores.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrHUkSJvF5ChbDWtAtrztp9De7OBhijd0M8V6m4-TpSr8WlCtklHHWOaF09warBl2uQAfKnBMZStNmLaIn8Dj5Ef84-mjm6LATie-qAsxreUK5ML-NgPLPjNxLemgjwnWFAxzYv0W5LHCDYSMee4RqdDaqJbzfqEfx_vqtBj0JD2tQHwEVZ3g/s72-c/Overhand3.jpg" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-2643680562376207743</guid><pubDate>Mon, 11 Sep 2023 17:06:00 +0000</pubDate><atom:updated>2023-09-11T18:59:12.778-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Ordenando vectores</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Wm5T7FUz7vBQWxdPFdksGCxaQK22AE01kD6niU6qDVIBqdAmNkJNPM6p2oiVoN4JzzlvpiZo6Or55vgXj514FIAzs3rIhtD6Rwa2SNfTqjh52Q11s-fbelR5dJ4EtjEKB3zt7m1F7T3973mjprnLuQ0IXx81ATAvkUDn4noNRA0AJRUI9jGE/s128/descarga.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;128&quot; data-original-width=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Wm5T7FUz7vBQWxdPFdksGCxaQK22AE01kD6niU6qDVIBqdAmNkJNPM6p2oiVoN4JzzlvpiZo6Or55vgXj514FIAzs3rIhtD6Rwa2SNfTqjh52Q11s-fbelR5dJ4EtjEKB3zt7m1F7T3973mjprnLuQ0IXx81ATAvkUDn4noNRA0AJRUI9jGE/s16000/descarga.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hace unos días les &lt;a href=&quot;https://tony-valderrama.blogspot.com/2023/09/revolviendo-un-vector-en-c.html&quot; target=&quot;_blank&quot;&gt;mostré como &quot;revolver&quot; el contenido en un vector&lt;/a&gt; en C++ (después de haber explicado, hace mucho, &lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/08/libreria-estandar-stl-y-vector.html&quot; target=&quot;_blank&quot;&gt;como usar vectores&lt;/a&gt; y luego &lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/09/vectores-iteradores-y-stl.html&quot; target=&quot;_blank&quot;&gt;iteradores&lt;/a&gt;), pero para otro problema tenía que ordenar un vector.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Encontré &lt;a href=&quot;https://iq.opengenus.org/sorting-vector-in-cpp/&quot; target=&quot;_blank&quot;&gt;esta página que lo explica muy bien&lt;/a&gt;, y luego lo apliqué a un ejemplo práctico que ordena un vector que tiene datos de diferente tipo. De esta manera pueden ver cómo funciona el método &lt;span style=&quot;font-family: courier;&quot;&gt;sort&lt;/span&gt; con mis propias funciones de comparación.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Te aconsejo de leer el post que explica el &lt;span style=&quot;font-family: courier;&quot;&gt;sort&lt;/span&gt; y aquí te dejo mi código de ejemplo:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;script src=&quot;https://gitlab.com/-/snippets/3596111.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
Espero que te sea útil. ¡Hasta la próxima!&lt;br /&gt;</description><link>http://tony-valderrama.blogspot.com/2023/09/ordenando-vectores.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Wm5T7FUz7vBQWxdPFdksGCxaQK22AE01kD6niU6qDVIBqdAmNkJNPM6p2oiVoN4JzzlvpiZo6Or55vgXj514FIAzs3rIhtD6Rwa2SNfTqjh52Q11s-fbelR5dJ4EtjEKB3zt7m1F7T3973mjprnLuQ0IXx81ATAvkUDn4noNRA0AJRUI9jGE/s72-c/descarga.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-3750807759862160227</guid><pubDate>Tue, 05 Sep 2023 19:18:00 +0000</pubDate><atom:updated>2023-09-11T18:59:20.117-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Revolviendo un vector en C++</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;
&lt;img border=&quot;0&quot; data-original-height=&quot;100&quot; data-original-width=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1vJT6hhP-MUxLHVX9FXvTOFh8gaHH4c6b84qMIj-Afj8_j4K7BUuxGvOmiNhXFrLAph1wnvXAMh7MS_o3yl0ipdj_FyEGNnFzWMJ02Af0_zmOTSFBkdVd0_EXsZX_pFCE9VCzVKMG2b19aHTbtr5oOSrJPdhIvkIWAwsVLpee8LyPiIIWlGrn/s16000/62_Shuffle.png&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;Hace tiempo escribí sobre cómo usar &lt;/span&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/08/libreria-estandar-stl-y-vector.html&quot; style=&quot;text-align: justify;&quot; target=&quot;_blank&quot;&gt;vectores en C++&lt;/a&gt;&lt;span style=&quot;text-align: justify;&quot;&gt; y &lt;/span&gt;&lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/09/vectores-iteradores-y-stl.html&quot; style=&quot;text-align: justify;&quot; target=&quot;_blank&quot;&gt;como usar iteradores&lt;/a&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;. Sin embargo, el otro día quise &quot;revolver&quot; (hacer un &lt;/span&gt;&lt;span style=&quot;font-family: courier; text-align: justify;&quot;&gt;shuffle&lt;/span&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;) a un vector y se me complicó un poquito encontrar la solución.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot; target=&quot;_blank&quot;&gt;Java&lt;/a&gt; existe &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/collections-shuffle-method-in-java-with-examples/&quot; target=&quot;_blank&quot;&gt;Collections.shuffle&lt;/a&gt;&lt;/span&gt; y quería algo similar para un vector. Y, después de experimentar un rato y leer varias páginas, encontré que existe una función shuffle que recibe dos iteradores (del inicio y final del vector) y un motor de generador de números aleatorios. Aquí les dejo el ejemplo simple que hice:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/2594186.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que esto les sirva en sus proyectos. ¡Saludos!&lt;/div&gt;&lt;br /&gt;</description><link>http://tony-valderrama.blogspot.com/2023/09/revolviendo-un-vector-en-c.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1vJT6hhP-MUxLHVX9FXvTOFh8gaHH4c6b84qMIj-Afj8_j4K7BUuxGvOmiNhXFrLAph1wnvXAMh7MS_o3yl0ipdj_FyEGNnFzWMJ02Af0_zmOTSFBkdVd0_EXsZX_pFCE9VCzVKMG2b19aHTbtr5oOSrJPdhIvkIWAwsVLpee8LyPiIIWlGrn/s72-c/62_Shuffle.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-7404689649420974173</guid><pubDate>Mon, 04 Sep 2023 15:05:00 +0000</pubDate><atom:updated>2023-09-04T09:11:10.133-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Instalando Python</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Empezaré a escribir un poco sobre &lt;a href=&quot;https://es.wikipedia.org/wiki/Python&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;, un lenguaje de alto nivel que se ha vuelto sumamente popular en los últimos años. Pero antes de empezar, es necesario tener las herramientas necesarias para poder crear y ejecutar programas hechas en este lenguaje.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Voy a mostrar una configuración mínima, que solo tenga lo necesario e indispensable para embarcar esta aventura. Así que solo necesitamos dos cosas: un editor de texto y el compilador/intérprete de Python.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Para editor de texto, podrías usar hasta el bloc de notas que viene en Windows, pero hay cosas mejores. Yo generalmente uso &lt;a href=&quot;https://notepad-plus-plus.org/&quot; target=&quot;_blank&quot;&gt;Notepad++&lt;/a&gt;&amp;nbsp;pero mejor decidí usar otro editor, llamado &lt;a href=&quot;https://en.wikipedia.org/wiki/Brackets_(text_editor)&quot; target=&quot;_blank&quot;&gt;Brackets&lt;/a&gt; porque funciona igual en Windows, Mac y Linux. Además, está muy padre.&lt;/p&gt;&lt;h2 style=&quot;text-align: center;&quot;&gt;&lt;b&gt;Instalar Python&lt;/b&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Primero voy a instalar el intérprete de Python. Para eso, primero hay que visitar la página &lt;a href=&quot;http://www.python.org&quot;&gt;www.python.org&lt;/a&gt;&amp;nbsp;como se ve en la siguiente imagen:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjguRwrou-ZjZljHISjZ_8rUV82tegVOBPulsY46L__UJA_6Bx8RAn5r-bRPZwCH8zVUyTxOd1VI1iDbRKvgUAd2ifu7SnruDjBOWS84rPlp1RWN5KlMILNIt1S4ynRjiJajlVCymnS5RGq8VpHhbXRmvrBqojn0viO2w5Fink8whaZzXC_P9SC/s1920/01%20Python.org.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;978&quot; data-original-width=&quot;1920&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjguRwrou-ZjZljHISjZ_8rUV82tegVOBPulsY46L__UJA_6Bx8RAn5r-bRPZwCH8zVUyTxOd1VI1iDbRKvgUAd2ifu7SnruDjBOWS84rPlp1RWN5KlMILNIt1S4ynRjiJajlVCymnS5RGq8VpHhbXRmvrBqojn0viO2w5Fink8whaZzXC_P9SC/s320/01%20Python.org.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;De allí, pon tu mouse sobre el botón Downloads:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn1j0XbG9BfR4EZSYjVFYmgtr4G1jeRPomLiRM9njJvkH1FyRKO16cU3FwoviJIlNn3qjI3eZidO2SWDPnTmlcO438k6i01E0w64YumGxCrZ-A9VVXVXSN9fc0eskmdNGHaQS_6Lu1imYvoEhVDX4if_2UiBPpcBr_Zv9g0wj-BaZpv5G0MrYq/s861/02%20Python%20Download.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;473&quot; data-original-width=&quot;861&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn1j0XbG9BfR4EZSYjVFYmgtr4G1jeRPomLiRM9njJvkH1FyRKO16cU3FwoviJIlNn3qjI3eZidO2SWDPnTmlcO438k6i01E0w64YumGxCrZ-A9VVXVXSN9fc0eskmdNGHaQS_6Lu1imYvoEhVDX4if_2UiBPpcBr_Zv9g0wj-BaZpv5G0MrYq/s320/02%20Python%20Download.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Debería reconocer tu sistema operativo y sugerir el que te corresponde. Como yo estoy haciendo todo sobre Windows, doy clic sobre el botón gris que dice Python 3.11.5 (que es la versión actual del intérprete de Python cuando escribí esto. Tal vez aparezca una versión más reciente). Descarga el archivo y ejecútalo. Debería aparecer una ventana como ésta:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA-srpcohfhXWnioIRI0TTA7Ad34fJrYmidiBuzAv73m2rKU684Ngl-TtfinKL_p5L57RktxDafDtC_ZNZRO5m5wKQkO9Y19XJaLcpEeeMBeV6Ol7rVzORzxKoTJZibuPTscjBs25aOw9kUAnBCsY7l1aWaoiaX1IV3kYI6odFZXqFL9N4KuNt/s824/03%20-%20Install%20Python%201.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;509&quot; data-original-width=&quot;824&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA-srpcohfhXWnioIRI0TTA7Ad34fJrYmidiBuzAv73m2rKU684Ngl-TtfinKL_p5L57RktxDafDtC_ZNZRO5m5wKQkO9Y19XJaLcpEeeMBeV6Ol7rVzORzxKoTJZibuPTscjBs25aOw9kUAnBCsY7l1aWaoiaX1IV3kYI6odFZXqFL9N4KuNt/s320/03%20-%20Install%20Python%201.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Si deseas instalar con las opciones default (que generalmente está muy bien), dale clic sobre &lt;b&gt;Install Now&lt;/b&gt;. Si quieres cambiar la carpeta donde se va a instalar o alguna otra opción, haz clic sobre &lt;b&gt;Customize Installation &lt;/b&gt;y en las ventanas siguientes seleccionas las opciones personalizadas. Cuando termines, te aparece la siguiente ventana. Presiona el botón &lt;b&gt;Close&lt;/b&gt; para terminar.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJXFmNClfFD8zCfjsR8_gQdTy4e-rnIc-f2q_r6oq48qpw3ZgiJkPtCSF-698gr6_66aZSSADh3TCcttXPr2ctcSeDKDPIuQcwncUzEnu9GmIG3qdHAB0M-Nj9uR_AIXTRUCqRTlwSN2bOWgk8PMuMaqgf_EPEPRM6RsMVfugHlK0kflGa4S2/s824/04%20Python%20install%20finish.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;509&quot; data-original-width=&quot;824&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJXFmNClfFD8zCfjsR8_gQdTy4e-rnIc-f2q_r6oq48qpw3ZgiJkPtCSF-698gr6_66aZSSADh3TCcttXPr2ctcSeDKDPIuQcwncUzEnu9GmIG3qdHAB0M-Nj9uR_AIXTRUCqRTlwSN2bOWgk8PMuMaqgf_EPEPRM6RsMVfugHlK0kflGa4S2/s320/04%20Python%20install%20finish.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;¡Felicidades! Ya instalaste Python. ahora instalemos Brackets.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: center;&quot;&gt;Instalar Brackets&lt;/h2&gt;&lt;div&gt;Para instalar Brackets, ve a la página &lt;a href=&quot;http://brackets.io&quot;&gt;brackets.io&lt;/a&gt;. Y te lleva a esta página:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLc7VA2yvLmsfRLd1R2wYz9UzhIu66Wf6vH8LxRaUN5NSiRfsFBskrpYI0g95FcoRI0eRqZ4hTm4sCJTC5dN0kKUgLldGoGGYeopF7-o8kaFpDLt5kqSyUDuMFtdx8DcvKzVe31ze7t3ie-5NC6DdHRn4zAwQM5HZOKtoufkFxBKFQznx1uyiu/s1918/05%20Brackets.io.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;979&quot; data-original-width=&quot;1918&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLc7VA2yvLmsfRLd1R2wYz9UzhIu66Wf6vH8LxRaUN5NSiRfsFBskrpYI0g95FcoRI0eRqZ4hTm4sCJTC5dN0kKUgLldGoGGYeopF7-o8kaFpDLt5kqSyUDuMFtdx8DcvKzVe31ze7t3ie-5NC6DdHRn4zAwQM5HZOKtoufkFxBKFQznx1uyiu/s320/05%20Brackets.io.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Y presiona el botón que dice &lt;b&gt;Download&lt;/b&gt;. Guarda el archivo y ejecútalo. Cuando lo corres, aparece esta ventana:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigjxi45YeajeYXu7ru-aR8vpe5gIIyk2t2Rn--FPgEmxJTE2wYGJM_gGlE8VK10yNMsM6JzympPlOmsAa0L-5WkTa1OLPFMEnQZTopibQF7iE6SsvpjsA-KtnQHtSWoWHtSlTLjyDc7z68d5lubXgW3K9klgvxezpCYgHI3DLPmN69LHNq-wMG/s720/06%20Brackets%20Install%201.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;720&quot; data-original-width=&quot;580&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigjxi45YeajeYXu7ru-aR8vpe5gIIyk2t2Rn--FPgEmxJTE2wYGJM_gGlE8VK10yNMsM6JzympPlOmsAa0L-5WkTa1OLPFMEnQZTopibQF7iE6SsvpjsA-KtnQHtSWoWHtSlTLjyDc7z68d5lubXgW3K9klgvxezpCYgHI3DLPmN69LHNq-wMG/s320/06%20Brackets%20Install%201.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Dile que estás de acuerdo y presiona el botón &lt;b&gt;Siguiente&lt;/b&gt;. En la siguiente ventana, selecciona &lt;i&gt;Típico&lt;/i&gt; (si quieres instalarlo de forma default) o &lt;i&gt;Personalizada &lt;/i&gt;(hay un par de opciones que puedes cambiar).&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCImZwan1P5MJKveO4fvOKrq5C_nSLCRxe-84qWMeqgBn2VArZZpOf7qry9OrVwp3itWSwXoCMhmeBvcVryAz6eygSVlVOCPLnxHPfsJjSe7_CkoBAwFPX5hb94JatjmXanR-xLxFi5iu3yzz0ubvLSZnKKKUdZ2OALUFpXoTLlhAfI6XuASx/s720/07%20Brackets%20install%202.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;720&quot; data-original-width=&quot;580&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCImZwan1P5MJKveO4fvOKrq5C_nSLCRxe-84qWMeqgBn2VArZZpOf7qry9OrVwp3itWSwXoCMhmeBvcVryAz6eygSVlVOCPLnxHPfsJjSe7_CkoBAwFPX5hb94JatjmXanR-xLxFi5iu3yzz0ubvLSZnKKKUdZ2OALUFpXoTLlhAfI6XuASx/s320/07%20Brackets%20install%202.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Espera un momento y cuando termines, aparece la ventana que te permite abrir Brackets o Finalizar. Sé feliz y haz lo que quieras porque ya tienes todo listo para trabajar con Python. ¡Felicidades!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqjf3E8bIGwGeV_hqpcMVc9tstV3NWg4I3-GiNjIFokPoQ8a55pXBmYYWoONS9WvukEqL6mvmWe68YbsZl5QApLiNQ2asPMQlyQbRbdJFtdvjC79bqwK9bRMAm5Pk1w3QG8LphSc-Ezch0Slfmi1xpLDkWsUumtgQcsSPcG1OP-HEgg7FI487/s720/08%20Brackets%20Install%203.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;720&quot; data-original-width=&quot;580&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqjf3E8bIGwGeV_hqpcMVc9tstV3NWg4I3-GiNjIFokPoQ8a55pXBmYYWoONS9WvukEqL6mvmWe68YbsZl5QApLiNQ2asPMQlyQbRbdJFtdvjC79bqwK9bRMAm5Pk1w3QG8LphSc-Ezch0Slfmi1xpLDkWsUumtgQcsSPcG1OP-HEgg7FI487/s320/08%20Brackets%20Install%203.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;En un futuro cercano seguiré escribiendo sobre Python para que sigas por aquí . ¡Saludos!&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2023/09/instalando-python.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjguRwrou-ZjZljHISjZ_8rUV82tegVOBPulsY46L__UJA_6Bx8RAn5r-bRPZwCH8zVUyTxOd1VI1iDbRKvgUAd2ifu7SnruDjBOWS84rPlp1RWN5KlMILNIt1S4ynRjiJajlVCymnS5RGq8VpHhbXRmvrBqojn0viO2w5Fink8whaZzXC_P9SC/s72-c/01%20Python.org.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-9123064086199977511</guid><pubDate>Sat, 13 May 2023 18:40:00 +0000</pubDate><atom:updated>2023-05-13T12:41:39.655-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Avisos de ocasión</category><title>IA 360: Desentrañando los misterios de la Inteligencia Artificial</title><description>&lt;p&gt;¿Alguna vez te has preguntado cómo funcionan los asistentes virtuales como Siri o Alexa, o cómo las redes sociales saben exactamente qué anuncios mostrarte? ¿Sabes qué puedes hacer con ChatGPT, Midjourney, DAL-E, etc.? Todo esto es posible gracias a la inteligencia artificial.&lt;/p&gt;&lt;p&gt;En mi conferencia, exploraremos cómo funciona la inteligencia artificial y discutiremos algunos de los diferentes usos de la inteligencia artificial en nuestra sociedad, desde la medicina hasta la industria automotriz y más allá.&lt;/p&gt;&lt;p&gt;Pero no todo son beneficios. Hablaremos de las implicaciones que tiene la inteligencia artificial en el mundo actual y futuro, incluyendo cómo afecta el empleo y la privacidad.&lt;/p&gt;&lt;p&gt;Así que únete a mí en esta emocionante conferencia para descubrir cómo la inteligencia artificial está cambiando el mundo a nuestro alrededor y cómo podemos prepararnos para un futuro impulsado por la IA. ¡Te espero allí!&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2mayWiT8PKVnLHdJmAmHMTgTgEYT-f9J_VrcNhhgGPaMoZbhyQGZQLUilACUy2Upp64tVRvsxM4pL7dWaswlcFmWVq_zOGAebJNWKunNvSAxVUBA4za4_lt-f9kSzJirdFaEJrgaIQ21U5ITepigDBWF_LIcuh45CdXGGxbzjZCPhFlcEGw/s5409/IA%20360.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;5409&quot; data-original-width=&quot;5000&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2mayWiT8PKVnLHdJmAmHMTgTgEYT-f9J_VrcNhhgGPaMoZbhyQGZQLUilACUy2Upp64tVRvsxM4pL7dWaswlcFmWVq_zOGAebJNWKunNvSAxVUBA4za4_lt-f9kSzJirdFaEJrgaIQ21U5ITepigDBWF_LIcuh45CdXGGxbzjZCPhFlcEGw/w370-h400/IA%20360.png&quot; width=&quot;370&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Si quieres ver el programa completo de la Semana Cultural 2023, visita &lt;a href=&quot;https://semanaculturalprepa2023.mailerpage.com/&quot; target=&quot;_blank&quot;&gt;esta liga&lt;/a&gt;.&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2023/05/ia-360-desentranando-los-misterios-de.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2mayWiT8PKVnLHdJmAmHMTgTgEYT-f9J_VrcNhhgGPaMoZbhyQGZQLUilACUy2Upp64tVRvsxM4pL7dWaswlcFmWVq_zOGAebJNWKunNvSAxVUBA4za4_lt-f9kSzJirdFaEJrgaIQ21U5ITepigDBWF_LIcuh45CdXGGxbzjZCPhFlcEGw/s72-w370-h400-c/IA%20360.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-4957686723033762757</guid><pubDate>Thu, 27 Apr 2023 14:21:00 +0000</pubDate><atom:updated>2023-04-27T08:21:53.676-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Studio</category><title>Música en Android Studio</title><description>Es posible/probable que quieras que tu app pueda tocar sonido, ya sea como múscia de fondo, como un efecto cuando algo sucede, etc. Aquí te voy a describir cómo hacerlo y te presento una app de ejemplo que hace aue una canción empiece a tocar (y que lo que lo puedas parar).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;En primer lugar, vamos a usar una clase que se encarga de todo ello, es el &lt;b&gt;MediaPlayer&lt;/b&gt;. Estos son los pasos que debes seguir:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Primero, tienes que crear una carpeta de recursos (dentro de la carpeta res) llamada raw. Para hacer esto, haz clic derecho sobre la carpeta res y luego selecciona &lt;b&gt;New &amp;gt; Folder &amp;gt; Raw Resources File&lt;/b&gt; como se ve en la siguiente imagen:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRu2pGuGcL8GKYDnGsI1gHPIdAniF1VSEZdAKQatLFbep843I5sXF07BX6v_gPAGaTfk2l9t4Wig65K3FnDq9FgqUGKgBecY4tT04oFdEld5Tbr9QywOphJ8qsJ53d_YRuBfW02TI6s1B0nWo8ve1zXk2J-cu0PhHxXDzMc2lV9WuTp63T7A/s1107/01.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;759&quot; data-original-width=&quot;1107&quot; height=&quot;274&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRu2pGuGcL8GKYDnGsI1gHPIdAniF1VSEZdAKQatLFbep843I5sXF07BX6v_gPAGaTfk2l9t4Wig65K3FnDq9FgqUGKgBecY4tT04oFdEld5Tbr9QywOphJ8qsJ53d_YRuBfW02TI6s1B0nWo8ve1zXk2J-cu0PhHxXDzMc2lV9WuTp63T7A/w400-h274/01.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Una vez que tengas la carpeta, copia un archivo MP3 allí. Para más fácil, lo puedes arrastrar desde tu administrador de archivos.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Nota&lt;/b&gt;: el archivo MP3 debe tener el nombre en minúsculas, sin espacios ni dígitos numéricos ni caracteres &quot;raros&quot;. Renómbralo si hace falta.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Después, en tu archivo &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot; target=&quot;_blank&quot;&gt;Java&lt;/a&gt;, declara un objeto de la clase MediaPlayer así:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;private MediaPlayer mediaPlayer;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Una vez creado el objeto, tienes que inicializarlo con el método &lt;span style=&quot;font-family: courier;&quot;&gt;onCreate&lt;/span&gt; de la siguiente manera:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;mediaPlayer = MediaPlayer.create(this, R.raw.tu_archivo_mp3);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;No te preocupes por el nombre del recurso: en cuanto escribas R.raw. Android Studio te muestra las opciones y una la vas a reconocer como tu rola.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Después de esto, usa el método que necesites:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;start()&lt;/span&gt; inicia la reproducción de la canción&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;stop()&lt;/span&gt;&amp;nbsp;detiene reproducción de la canción&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;release()&lt;/span&gt;&amp;nbsp;libera todos los recursos usados por el MediaPlayer (es bueno usar este al final, cuando ya no vas a usar la rola)&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;setLooping(true)&lt;/span&gt; sirve para decir que la canción se repita al terminar. Solo ten en cuenta que si es una canción que dura mucho, tal vez quieras usar un Service en lugar de un Activity para que se reproduzca para que se siga escuchando aun cuando el usuario navega a otras partes de la app o bloquea la pantalla.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Para demostrar esto, voy a mostrar el código para hacer una app sencilla que tiene dos botones: cuando presionas el de Iniciar, muestra cuánto dura la canción y lo empieza a tocar. Si das click en el botón de Parar, deja de tocar la canción. Para este ejemplo, usé la canción de Shakira y Bizzarap porque la traía pegada el día que hice el ejemplo.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;La interfaz se ve así:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIe_z1KbVsP35hUvPXvz8KbPP-xzLlPxywDb338DfitiPF3-8DXNdHVoKOOXBAFRsrhUimP5aCc00wvRyZrBR2cvgtygxrwD_S1x1OdaQNoypfz4b1b4hzhkeDZY1VK9mQ6lrosBFYwmW42UmsOik4otsygzZ5cLnlOBNKFEB_FUHl8sg-hw/s855/02.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;855&quot; data-original-width=&quot;422&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIe_z1KbVsP35hUvPXvz8KbPP-xzLlPxywDb338DfitiPF3-8DXNdHVoKOOXBAFRsrhUimP5aCc00wvRyZrBR2cvgtygxrwD_S1x1OdaQNoypfz4b1b4hzhkeDZY1VK9mQ6lrosBFYwmW42UmsOik4otsygzZ5cLnlOBNKFEB_FUHl8sg-hw/s320/02.png&quot; width=&quot;158&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;Éste es el código de la interfaz:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/2533697.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;Y este es el código en la actividad en &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/Java&quot; target=&quot;_blank&quot;&gt;Java&lt;/a&gt;:&lt;/div&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/2533718.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Espero que les haya sido útil y ya puedan integrar música a sus apps. ¡Hasta la próxima!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</description><link>http://tony-valderrama.blogspot.com/2023/04/musica-en-android-studio.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRu2pGuGcL8GKYDnGsI1gHPIdAniF1VSEZdAKQatLFbep843I5sXF07BX6v_gPAGaTfk2l9t4Wig65K3FnDq9FgqUGKgBecY4tT04oFdEld5Tbr9QywOphJ8qsJ53d_YRuBfW02TI6s1B0nWo8ve1zXk2J-cu0PhHxXDzMc2lV9WuTp63T7A/s72-w400-h274-c/01.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-6374884531846905416</guid><pubDate>Sun, 22 Jan 2023 00:27:00 +0000</pubDate><atom:updated>2023-01-21T18:27:49.858-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><title>Condiciones en C: el Gato 2.0</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Hace años publiqué una explicación sobre &lt;a href=&quot;https://tony-valderrama.blogspot.com/2009/02/condiciones-en-c-el-gato.html&quot; target=&quot;_blank&quot;&gt;condiciones en C&lt;/a&gt;. En aquel tiempo lo hice todo en audio porque tenía un alumno con debilidad visual (casi ciego). Pero el servidor donde subí el audio cerró sin decir agua va y el artículo no sirve de mucho: puedes ver parte de la explicación y el código, pero se pierde mucho. Asi que, como sigo hablando de &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C&quot; target=&quot;_blank&quot;&gt;C&lt;/a&gt; con mis alumnos (y seguiré haciéndolo), es hora de volver a explicarlo.&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Uno de los pilares de la programación es hacer que el programa tome decisiones.&amp;nbsp; En otro ámbito, eso es lo que los papás esperamos de nuestros hijos: de que algún día puedan tomar las decisiones correctas.&amp;nbsp; Pero al tratar con la computadora es más fácil: nunca va a renegar ni a ignorar lo que le diga (como lo suelen hacer mis hijas) porque siempre va a hacer lo que le indique y siempre lo hará igual.&amp;nbsp; Claro que mis niñas pueden hacer millones de cosas que mi computadora no, y las amo millones de veces más que mi compu, pero esa es harina de otro costal.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Volviendo al mundo de la programación, casi todos los lenguajes tienen la instrucción IF que nos permite definir las instrucciones que se van a ejecutar en caso que se cumpla alguna condición.&amp;nbsp; &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C&quot; target=&quot;_blank&quot;&gt;C&lt;/a&gt; no es la excepción y en el siguiente video te voy a explicar un programa que usa condiciones IF en&amp;nbsp;&lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C&quot;&gt;C&lt;/a&gt; (o &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C%2B%2B&quot; target=&quot;_blank&quot;&gt;C++&lt;/a&gt; que para este caso, da lo mismo).&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;En el video explico un programa ya hecho, un ejemplo que usa IFs. Si no tienes idea de qué es el IF, te sugiero revisar &lt;a href=&quot;https://www.nachocabanes.com/c/curso/cc03.php&quot; target=&quot;_blank&quot;&gt;esta página&lt;/a&gt; de Nacho Cabanes que lo explica. Luego regresas a este video.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Aquí está el video:&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/RXjnDsstuJs&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Y aquí está el código del programa:&lt;/p&gt;
&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/2486886.js&quot;&gt;&lt;/script&gt;</description><link>http://tony-valderrama.blogspot.com/2023/01/condiciones-en-c-el-gato-20.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/RXjnDsstuJs/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-4944693749796367617</guid><pubDate>Tue, 17 Jan 2023 18:23:00 +0000</pubDate><atom:updated>2023-01-17T12:23:54.122-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>C# y números al azar</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Hace tiempo escribí como se pueden &lt;a href=&quot;https://tony-valderrama.blogspot.com/2011/08/numeros-aleatorios-en-c.html&quot; target=&quot;_blank&quot;&gt;generar números aleatorios en C++&lt;/a&gt; (que igual aplica para &lt;a href=&quot;https://tony-valderrama.blogspot.com/search/label/C&quot; target=&quot;_blank&quot;&gt;C&lt;/a&gt;). Es sencillo y funcional. Sin embargo, en C# tenemos algo que todavía nos simplifica más la vida: la clase &lt;b&gt;Random&lt;/b&gt;. Antes de continuar, te recomiendo leer el artículo anterior y cuando hable de código, regresen aquí.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;En el otro post se usa el &lt;span style=&quot;font-family: courier;&quot;&gt;srand((unsigned)time(0))&lt;/span&gt; para incializar el generador de números pseudoaleatorios con el valor del reloj del sistema. Al usar la clase &lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Random&lt;/span&gt;&lt;/b&gt;, el constructor hace lo mismo. Asi que cuando iniciemos nuestro programa, se crea el objeto de la siguiente manera:&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Random x = new Random();&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Con eso se crea un objeto (e inicializa el generador de números usando el valor del reloj del sistema).&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Tal ve te preguntes, ¿por qué se tiene que inicializar el generador de números aleatorios y porque es conveninte hacerlo con el reloj del sistema? Si no te lo preguntas y aceptas lo que te dicen sin cuestionar, sáltate los siguientes párrafos hasta que veas código.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Básicamente es porque no existe una manera de generar números al azar porque los cerebros humanos lo pueden hacer, pero no existe un procedimiento, un proceso para hacerlo. Por ejemplo piensa ahorita en un número al azar entre 1 y 10. ¿Por qué elegiste ese número? ¿Que proceso seguiste para determinar ese número? Simplemente se te ocurrió. Pero la computadora necesita que se le diga exactamente cómo hacer algo.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Asi que podemos agradecer a alguna deidad de las matemáticas* que se le ocurrió una ecuación que genera secuencias de números que parecen aleatorios (por eso los llamamos pseudoaleatorios). Pero el problema es que cada vez que lo usas, genera la misma serie. Pero a este señor se le ocurrió ponerle a esta ecuación un valor inicial y la secuencia depende de ese número. Por ejemplo, si lo inicializamos con 5, nos dará una secuencia de números. Si lo inicializamos con 6 nos da otra, etc. Por eso, si lo inicializamos con el reloj del sistema, cada vez que lo usemos nos dará una secuencia diferente.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Pero regresando a lo que estábamos hablando sobre el código, después de crear un objeto Random, generamos números enteros usando el método &lt;span style=&quot;font-family: courier;&quot;&gt;Next&lt;/span&gt;. Me voy a concentrar en números enteros, pero también puedes usar &lt;span style=&quot;font-family: courier;&quot;&gt;NextDouble&lt;/span&gt; para generar números aleatorios de tipo float/double que van entre 0 y 0.99999999, &lt;span style=&quot;font-family: courier;&quot;&gt;NextBytes&lt;/span&gt; para llenar un arreglos con bytes aleatorios, etc.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Asi que, siguiente con el objeto &lt;span style=&quot;font-family: courier;&quot;&gt;x&lt;/span&gt; que hice antes en el ejemplo de crear un objeto de tipo &lt;b&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;Random&lt;/span&gt;&lt;/b&gt;, tenemos estas variantes del &lt;span style=&quot;font-family: courier;&quot;&gt;Next&lt;/span&gt;:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;x.Next()&lt;/span&gt; - devuelve un número entero aleatorio positivo.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;x.Next(10)&lt;/span&gt; - devuelve un número entero aleatorio entre 0 y 9.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;x.Next(1,10)&lt;/span&gt;&amp;nbsp;- devuelve un número entero aleatorio entre&amp;nbsp;1 y 9.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Si quieres saber todo sobre el &lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Random&lt;/b&gt;&lt;/span&gt;, lee &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.random?view=net-7.0&quot; target=&quot;_blank&quot;&gt;este artículo&lt;/a&gt; de Microsoft.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Para ejemplificar el uso, hice esta sencilla app que prueba los tres tipos de &lt;span style=&quot;font-family: courier;&quot;&gt;Next&lt;/span&gt;. Tiene un &lt;span style=&quot;font-family: courier;&quot;&gt;Label&lt;/span&gt; donde muestra el número aleatorio, en un &lt;span style=&quot;font-family: courier;&quot;&gt;Groupbox&lt;/span&gt; hay 3 &lt;span style=&quot;font-family: courier;&quot;&gt;RadioButton&lt;/span&gt;s para seleccionar los tres tipos de &lt;span style=&quot;font-family: courier;&quot;&gt;Next&lt;/span&gt; y &lt;span style=&quot;font-family: courier;&quot;&gt;Textbox&lt;/span&gt;es para poner los números límites, si se seleccionan esas opciones. La app se ve como lo que puesta esta imagen y creo que de ver la interfaz, te puedes dar cuenta de cómo funciona:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmmyGwLDz9s6iUgAXOjT5pipGdc1BVbhciznVZGA8v3uJB2n5erJkEssr_nQIioisD8rrJ453ROu_HTZkRqbeCbwps2WzK3M1o0y4_uOJiguXjrq-aqH3mgjDfrd8nk4oceDZQOXYMsKB0fM7CCgpK-686wHIOwFV89qmKVa8QV9DLDWqIw/s701/01.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;262&quot; data-original-width=&quot;701&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmmyGwLDz9s6iUgAXOjT5pipGdc1BVbhciznVZGA8v3uJB2n5erJkEssr_nQIioisD8rrJ453ROu_HTZkRqbeCbwps2WzK3M1o0y4_uOJiguXjrq-aqH3mgjDfrd8nk4oceDZQOXYMsKB0fM7CCgpK-686wHIOwFV89qmKVa8QV9DLDWqIw/s320/01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;El código del Form1.cs (que hace todo) lo tienes aquí a continuación. Lo &quot;especial&quot; sucede en estas líneas:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;18 - Declaro el objeto &lt;span style=&quot;font-family: courier;&quot;&gt;Random&lt;/span&gt; (se llama &lt;span style=&quot;font-family: courier;&quot;&gt;azar&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;31 al 71 - El método&amp;nbsp;&lt;span style=&quot;font-family: courier;&quot;&gt;btnGeneraAzar_Click&lt;/span&gt; que se ejecuta cuando presionan el botón y usa los 3 tipos de &lt;span style=&quot;font-family: courier;&quot;&gt;Next&lt;/span&gt; para generar números al azar. Como dice allí, recuerda que &lt;span style=&quot;font-family: courier;&quot;&gt;int.Parse&lt;/span&gt; sirve para convertir un String (lo que está en una caja de texto en mi caso) a int (valor que necesita el Next).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/tony_valderrama/ejemplos-de-mi-blog/-/snippets/2485502.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Si desea descargar el proyecto comprimido en formato &lt;a href=&quot;https://www.7-zip.org/&quot; target=&quot;_blank&quot;&gt;7Zip&lt;/a&gt;, haz click &lt;a href=&quot;https://drive.google.com/file/d/13bJzBBMdwOFrcUCC_AQkXVUUDEoKcuD5/view?usp=sharing&quot;&gt;&lt;b&gt;aquí&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;* Gracias al artículo &lt;i&gt;&lt;a href=&quot;https://www.analyticsinsight.net/a-history-of-the-random-number-generator/&quot; target=&quot;_blank&quot;&gt;A History of the Random Number Generator&lt;/a&gt;&lt;/i&gt;, descubrí que la deidad de matemáticas que nos ayudó fue&amp;nbsp;John von Neumann y lo hizo 1946&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2023/01/c-y-numeros-al-azar.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmmyGwLDz9s6iUgAXOjT5pipGdc1BVbhciznVZGA8v3uJB2n5erJkEssr_nQIioisD8rrJ453ROu_HTZkRqbeCbwps2WzK3M1o0y4_uOJiguXjrq-aqH3mgjDfrd8nk4oceDZQOXYMsKB0fM7CCgpK-686wHIOwFV89qmKVa8QV9DLDWqIw/s72-c/01.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-8219334780521617286</guid><pubDate>Sun, 05 Jun 2022 21:12:00 +0000</pubDate><atom:updated>2022-06-06T07:51:25.185-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android Studio</category><title>Android Studio: aprovechando el almacenamiento interno</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Muchas veces en nuestra app queremos guardar los datos que tenemos en la memoria para que estén disponibles cuando abramos la app en otra ocasión.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Para hacerlo, según los &lt;a href=&quot;https://developer.android.com/training/data-storage&quot; target=&quot;_blank&quot;&gt;desarrolladores de Android&lt;/a&gt;, tenemos 4 opciones:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Almacenamiento específico de la app&lt;/b&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;: Almacena archivos diseñados solo para tu app, ya sea en directorios dedicados dentro de un volumen de almacenamiento interno o en directorios dedicados diferentes dentro del almacenamiento externo. Usa los directorios del almacenamiento interno para guardar información sensible a la que otras apps no deberían acceder. El almacenamiento externo es cuando quieres hacer un archivo que el usuario después puede usar de forma independiente a tu programa.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Almacenamiento compartido&lt;/b&gt;: Almacena archivos que tu app pretenda compartir con otras apps, incluidos archivos multimedia, documentos y otros.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Preferencias&lt;/b&gt;: Almacena datos primitivos y privados en pares clave-valor. Muy útil para guardar datos sobre la configuración, pero se puede usar para otras cosas también.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Bases de datos&lt;/b&gt;: Almacena datos estructurados en una base de datos privada.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para mayor explicación y una tabla comparativa de todos estos tipos, les sugiero que visiten &lt;a href=&quot;https://developer.android.com/training/data-storage&quot;&gt;esta liga&lt;/a&gt;. En este post, voy a explicar como usar la primera opción, y de forma más particular, solo el almacenamiento interno.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Según Google (que se puede ver &lt;a href=&quot;https://developer.android.com/training/data-storage/app-specific&quot; target=&quot;_blank&quot;&gt;en esta liga&lt;/a&gt;), nos dice que son seguros porque en la ubicación donde los guarda en tu teléfono, como está encriptado, no se pueden accesar de otras apps. También hay que considerar que cuando el usuario desinstala tu app, estos archivos se borran (generalmente eso es lo que quieres para que no termines como con Windows que al desinstalar algo deja como mil archivos en tu compu).&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para ejemplificar como se puede almacenar y leer algo del almacenamiento interno, te lo muestro en este video donde explico cómo hice una app que guarda datos de un arreglo de objetos a un archivo, luego los lee. Abajo comparto el código&amp;nbsp;de la app.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En este primer video muestro la interfaz de la app y se ve como funciona:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/WTWiyvDTN80&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Y en éste video muestro cómo funciona la app, el código en Java que hace que todo funcione.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/QXatDBFfxJA&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Éste es el archivo XML de la interfaz de la app. Yo lo hice con las herramientas visuales, pero aquí se pueden ver todas las propiedades que le asigné a cada control:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/2343952.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Y aquí está el código Java de la app que fue explicada en el video:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/2343954.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Finalmente está el código de la clase Datos, que es con la que se llena el ArrayList y se escribe al archivo:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;script src=&quot;https://gitlab.com/-/snippets/2344443.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Ligas de interés:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://developer.android.com/training/data-storage/app-specific&quot; target=&quot;_blank&quot;&gt;Cómo acceder a los archivos internos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/11920754/android-fill-spinner-from-java-code-programmatically&quot; target=&quot;_blank&quot;&gt;Llenar un Spinner con el contenido de una lista&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/16111496/java-how-can-i-write-my-arraylist-to-a-file-and-read-load-that-file-to-the&quot; target=&quot;_blank&quot;&gt;Escribir un ArrayList a un archivo&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/43513919/android-alert-dialog-with-one-two-and-three-buttons&quot; target=&quot;_blank&quot;&gt;Mostrar ventana con uno, dos o tres botones&lt;/a&gt; (Alert)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2022/06/android-studio-aprovechando-el.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/WTWiyvDTN80/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-6943969864686959569</guid><pubDate>Wed, 27 Apr 2022 17:46:00 +0000</pubDate><atom:updated>2022-05-10T07:42:51.121-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Avisos de ocasión</category><category domain="http://www.blogger.com/atom/ns#">Videojuegos</category><title>Los videojuegos te pueden hacer una mejor persona</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;En unas semanas estaré dando esta conferencia en la Univa. La cita es el &lt;b&gt;jueves 26 de Mayo&lt;/b&gt; a las &lt;b&gt;12 horas&lt;/b&gt;&amp;nbsp;en el &lt;b&gt;SUM&lt;/b&gt;.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAtr7luy0PhJDaIMxoIdJieuANLXgWcwbjJUCzYLkdFCgvNC42gpSmZRSyJlTDq0nzEw6HLScrAw4zvwtgap0UvRE491QcAGvV_t5NjQk9srkl3ulWXt2-MC6BQA3KNfGfL-oBDCCbJHWCnfJ-PH-hpLTBit8_wGUhfZrw-Dacix3ekMuFA/s800/Conferencia%20Videojuegos.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;800&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAtr7luy0PhJDaIMxoIdJieuANLXgWcwbjJUCzYLkdFCgvNC42gpSmZRSyJlTDq0nzEw6HLScrAw4zvwtgap0UvRE491QcAGvV_t5NjQk9srkl3ulWXt2-MC6BQA3KNfGfL-oBDCCbJHWCnfJ-PH-hpLTBit8_wGUhfZrw-Dacix3ekMuFA/w400-h400/Conferencia%20Videojuegos.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Si tienes tiempo, por allí te espero.&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2022/04/los-videojuegos-te-pueden-hacer-una.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAtr7luy0PhJDaIMxoIdJieuANLXgWcwbjJUCzYLkdFCgvNC42gpSmZRSyJlTDq0nzEw6HLScrAw4zvwtgap0UvRE491QcAGvV_t5NjQk9srkl3ulWXt2-MC6BQA3KNfGfL-oBDCCbJHWCnfJ-PH-hpLTBit8_wGUhfZrw-Dacix3ekMuFA/s72-w400-h400-c/Conferencia%20Videojuegos.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-2213954949357988195</guid><pubDate>Wed, 19 Jan 2022 00:03:00 +0000</pubDate><atom:updated>2022-01-18T18:03:17.065-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Diseño gráfico</category><category domain="http://www.blogger.com/atom/ns#">Unity</category><category domain="http://www.blogger.com/atom/ns#">Videojuegos</category><title>Assets gratuito para videojuegos</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOpkzYa5ByXTHlX2zAs-VOvmZSJm_qj092uNNKz-3URL2pNymx57_tZkIt1su-QXvcUaPG1oZn5RvJKA1CibpiyemFFBEj-VPbgFQ3KnWM2Vr7731MraEk47StebnIx7iOJfFftsGzvQQtcjyKjNL5Z5ZUAD_pr2zxhEh_SHo5A7Kgq2xbag=s732&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;309&quot; data-original-width=&quot;732&quot; height=&quot;84&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOpkzYa5ByXTHlX2zAs-VOvmZSJm_qj092uNNKz-3URL2pNymx57_tZkIt1su-QXvcUaPG1oZn5RvJKA1CibpiyemFFBEj-VPbgFQ3KnWM2Vr7731MraEk47StebnIx7iOJfFftsGzvQQtcjyKjNL5Z5ZUAD_pr2zxhEh_SHo5A7Kgq2xbag=w200-h84&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Para quienes no somos diseñadores, nos cuesta un poco de trabajo crear recursos para divertirnos haciendo videojuegos. Pero algo padre de la era de internet es que hay muchos sitios donde podemos descargar de forma legal assets (imágenes, sonidos, etc) de forma gratuita, aunque muchos de ellos también hay recursos por los que se pagan.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;A continuación escribo una lista de sitios de este tipo que te pueden ser de utilidad.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://assetstore.unity.com/top-assets/top-free&quot; target=&quot;_blank&quot;&gt;Unity Asset Store&lt;/a&gt;. Éste solo funciona para Unity, pero tiene muchísimas cosas. La liga es para recursos gratuitos, pero hay también de paga que están increíbles.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://opengameart.org/&quot; target=&quot;_blank&quot;&gt;OpenGameArt&lt;/a&gt;. Aquí puedes encontrar un archivo enorme de recursos gratuitos.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://kenney.nl/assets&quot; target=&quot;_blank&quot;&gt;Kenney&lt;/a&gt;. Aquí tiene muchos recursos gratuitos y unos paquetes de paga.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://itch.io/game-assets/free&quot; target=&quot;_blank&quot;&gt;Itch.io&lt;/a&gt;. Es un sitio para compartir juegos (puedes subir aquí tu juego cuando lo termines para compartirlo con la comunidad), pero también tiene una sección de recursos que puedes usar.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://www.gameart2d.com/&quot; target=&quot;_blank&quot;&gt;GameArt2D&lt;/a&gt;. Este sitio tiene muchos recursos en 2D (como es obfvio suponer por el nombre del sitio) que puedes usar.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://craftpix.net/freebies/&quot; target=&quot;_blank&quot;&gt;CraftPix&lt;/a&gt;. Es un sitio lleno de assets gratuitos y de pago.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Comunidad &lt;a href=&quot;https://www.reddit.com/r/gameassets/&quot; target=&quot;_blank&quot;&gt;r/gameassets&lt;/a&gt; en Reddit. Si eres usuario de esta red social, esta comunidad publica recursos gratuitos que le gustan a los miembros.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que estos recursos te sean de utilidad.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2022/01/assets-gratuito-para-videojuegos.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhOpkzYa5ByXTHlX2zAs-VOvmZSJm_qj092uNNKz-3URL2pNymx57_tZkIt1su-QXvcUaPG1oZn5RvJKA1CibpiyemFFBEj-VPbgFQ3KnWM2Vr7731MraEk47StebnIx7iOJfFftsGzvQQtcjyKjNL5Z5ZUAD_pr2zxhEh_SHo5A7Kgq2xbag=s72-w200-h84-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-6799053928728872416</guid><pubDate>Wed, 27 Oct 2021 04:04:00 +0000</pubDate><atom:updated>2023-09-11T18:59:29.927-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Memoria dinámica en C++</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Hace mucho tiempo, escribí acerca de &lt;a href=&quot;https://tony-valderrama.blogspot.com/2009/10/apuntadores-en-c-pa-onde-apunto.html&quot; target=&quot;_blank&quot;&gt;apuntadores en C&lt;/a&gt;. Sin embargo, ya tocaba modernizarlo para que funcionara con C++.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;En este video te explico como está la onda y abajo pongo imágenes con el código que aparece en el video para que lo puedas ver con más calma.&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/KTkvmke94OA&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-6398701722332843&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;3561478430&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Éste es el primer ejemplo:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJS-Luli0B_U2qT96XlphyhLT61o-0E0Xkk27yuClAFcWKfLpl_tFR0dcLcSb6pzEMHVX15BhffYDjyQ5TPy9hWDrZc-12X3n2PL2g7-m9aojKvnKaUV4wU7redcWLgOx6Lm65/s882/dinamico.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;882&quot; data-original-width=&quot;727&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJS-Luli0B_U2qT96XlphyhLT61o-0E0Xkk27yuClAFcWKfLpl_tFR0dcLcSb6pzEMHVX15BhffYDjyQ5TPy9hWDrZc-12X3n2PL2g7-m9aojKvnKaUV4wU7redcWLgOx6Lm65/s320/dinamico.png&quot; width=&quot;264&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;Y éste es el segundo:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDvWlmAIdZyR0Cqo4rx-TFXhGyPqtTB1CEjIVvEaWkiGmtX5q_EVfVl0v7h92U7tF8KVMaErUYWroW8cq32igjFywokUkeF3mw6-Jsypigf4qQc1jQhvx32y0FZspJQqkSBSS7/s926/dinamico2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;926&quot; data-original-width=&quot;674&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDvWlmAIdZyR0Cqo4rx-TFXhGyPqtTB1CEjIVvEaWkiGmtX5q_EVfVl0v7h92U7tF8KVMaErUYWroW8cq32igjFywokUkeF3mw6-Jsypigf4qQc1jQhvx32y0FZspJQqkSBSS7/s320/dinamico2.png&quot; width=&quot;233&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Espero que te haya sido útil. ¡Hasta la próxima!&lt;/p&gt;</description><link>http://tony-valderrama.blogspot.com/2021/10/memoria-dinamica-en-c.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/KTkvmke94OA/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-37481028.post-8999938685849492743</guid><pubDate>Wed, 27 Oct 2021 01:23:00 +0000</pubDate><atom:updated>2021-10-26T20:23:38.833-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Word</category><title>Word: orientación, márgenes y columnas</title><description>En este video te muestro como cambiarlos márgenes, la orientación del documento o una página y poner texto en columnas. Espero que te sea de ayuda.&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/xIwlqZH0vBE&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://tony-valderrama.blogspot.com/2021/10/word-orientacion-margenes-y-columnas.html</link><author>noreply@blogger.com (Tony Valderrama)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/xIwlqZH0vBE/default.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>