<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>
	<channel>
		<title>Dudas de Programacion &#187; Recent Posts</title>
		<link>http://www.dudasprogramacion.com/</link>
		<description>Dudas sobre lenguajes y apis de programación</description>
		<language>en-US</language>
		<pubDate>Sun, 05 Feb 2012 06:48:29 +0000</pubDate>
		<generator>bbpress 1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.dudasprogramacion.com/search.php</link>
		</textInput>
		<atom:link href="http://www.dudasprogramacion.com/rss/" rel="self" type="application/rss+xml" />

		<item>
			<title>YtseJam on "Problema con GUI"</title>
			<link>http://www.dudasprogramacion.com/topic/problema-con-gui#post-1022</link>
			<pubDate>Wed, 01 Feb 2012 00:54:42 +0000</pubDate>
			<dc:creator>YtseJam</dc:creator>
			<guid isPermaLink="false">1022@http://www.dudasprogramacion.com/</guid>
			<description><p>Que tal?<br />
Estoy luchando con unas ventanas que tengo que hacer para un proyecto de la Facu.<br />
Inicialmente me habia preocupado por la funcionabilidad y no tanto por el diseño. Ahora que lo quiero mejorar, me encuentro con el siguiente problema:<br />
Tengo mucho espacio vertical entre los jLabels y los jTextFields</p>
<p><a href="http://s2.subirimagenes.com/imagen/previo/thump_7387395ventana.png" rel="nofollow">http://s2.subirimagenes.com/imagen/previo/thump_7387395ventana.png</a></p>
<p>Y este es el codigo que genera esta ventana.</p>
<p>public void listarChoferes() throws ConnectException{</p>
<p>                 ScrollPane scroll = new ScrollPane();<br />
                 String codigoChofer;<br />
                 boolean first = true;<br />
              try {<br />
                    for (Iterator&#60;Chofer&#62; iterator = Chofer_DTO.listarChoferes().iterator(); iterator.hasNext();) {</p>
<p>                      Chofer chofer = (Chofer) iterator.next();</p>
<p>                         JLabel  lblCodigoCofer = new javax.swing.JLabel();<br />
                         JLabel  lblNombreChofer = new javax.swing.JLabel();<br />
                         JLabel  lblDniChofer = new javax.swing.JLabel();<br />
                         JLabel  lblApellidoChofer = new javax.swing.JLabel();<br />
                         JLabel  lblDireccionChofer = new javax.swing.JLabel();<br />
                         JLabel  lblCpChofer = new javax.swing.JLabel();<br />
                         JLabel  lblIdLocalidadChofer = new javax.swing.JLabel();<br />
                         JLabel  lblTelParticularChofer = new javax.swing.JLabel();<br />
                         JLabel  lblCelularChofer = new javax.swing.JLabel();<br />
                         JLabel  lblNextelChofer = new javax.swing.JLabel();<br />
                         JLabel  lblMailChofer = new javax.swing.JLabel();<br />
                         JLabel  lblCodigoChofer = new javax.swing.JLabel();</p>
<p>                         JLabel  lblVacio = new javax.swing.JLabel();<br />
                         JLabel  lblVacio1 = new javax.swing.JLabel();</p>
<p>                         final JButton btnConfirModificar = new javax.swing.JButton();<br />
                         final JButton btnEliminar = new javax.swing.JButton();<br />
                     JTextField txtCodigo = new JTextField();<br />
                       JTextField txtNombre= new JTextField();<br />
                     JTextField txtDni = new JTextField();<br />
                       JTextField txtApellido= new JTextField();<br />
                     JTextField txtDireccion = new JTextField();<br />
                       JTextField txtIdLocalidad= new JTextField();<br />
                     JTextField txtTelParticular = new JTextField();<br />
                       JTextField txtCelular= new JTextField();<br />
                       JTextField txtNextel= new JTextField();<br />
                       JTextField txtMail= new JTextField();<br />
                       JTextField txtCp= new JTextField();<br />
                       if(first) {</p>
<p>                            lblCodigoChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblCodigoChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblCodigoChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblCodigoChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblCodigoChofer.setText("Código");</p>
<p>                          lblApellidoChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                            lblApellidoChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblApellidoChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblApellidoChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblApellidoChofer.setText("Apellido");</p>
<p>                          lblDireccionChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblDireccionChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblDireccionChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblDireccionChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblDireccionChofer.setText("Dirección");</p>
<p>                          lblDniChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblDniChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblDniChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblDniChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblDniChofer.setText("Dni");</p>
<p>                          lblCpChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblCpChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblCpChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblCpChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblCpChofer.setText("CP");</p>
<p>                          lblCelularChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblCelularChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblCelularChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblCelularChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblCelularChofer.setText("Celular");</p>
<p>                          lblMailChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblMailChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblMailChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblMailChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblMailChofer.setText("Mail");</p>
<p>                          lblNextelChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblNextelChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblNextelChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblNextelChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblNextelChofer.setText("Nextel");</p>
<p>                          lblTelParticularChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblTelParticularChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblTelParticularChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblTelParticularChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblTelParticularChofer.setText("Teléfono");</p>
<p>                          lblIdLocalidadChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblIdLocalidadChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblIdLocalidadChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblIdLocalidadChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblIdLocalidadChofer.setText("Localidad");</p>
<p>                          lblNombreChofer.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblNombreChofer.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblNombreChofer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblNombreChofer.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblNombreChofer.setText("Nombre");</p>
<p>                          lblVacio.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblVacio.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblVacio.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblVacio.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblVacio.setText("Acción");</p>
<p>                          lblVacio1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N<br />
                          lblVacio1.setForeground(new java.awt.Color(0, 51, 204));<br />
                          lblVacio1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);<br />
                          lblVacio1.setVerticalAlignment(javax.swing.SwingConstants.TOP);<br />
                          lblVacio1.setText("Acción");<br />
                       }</p>
<p>                     btnConfirModificar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N<br />
                     btnConfirModificar.setForeground(new java.awt.Color(0, 204, 102));<br />
                     btnConfirModificar.setText("Modificar");<br />
                     btnConfirModificar.setName(String.valueOf(chofer.getChoferId()));</p>
<p>                     btnEliminar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N<br />
                     btnEliminar.setForeground(new java.awt.Color(255, 0, 0));<br />
                     btnEliminar.setText("Eliminar");<br />
                        txtCodigo.setEditable(false);<br />
                       txtNombre.setEditable(false);</p>
<p>                     codigoChofer = String.valueOf(chofer.getChoferId());<br />
                         txtCodigo.setText(codigoChofer);<br />
                         txtCodigo.setSize(50,50);<br />
                         txtCodigo.setBounds(10,50,0,0);<br />
                         //txtCodigo.setFont(new Font("Tahoma", 1, 11));<br />
                       txtNombre.setText(chofer.getNombre());<br />
                       txtDni.setText(chofer.getDni().toString());<br />
                       txtApellido.setText(chofer.getApellido());<br />
                       txtDireccion.setText(chofer.getDireccion());<br />
                       txtIdLocalidad.setText(String.valueOf(chofer.getLocalidad()));<br />
                       txtCp.setText(String.valueOf(chofer.getCodPostal()));</p>
<p>                       txtTelParticular.setText(chofer.getTelefono().toString());<br />
                       txtCelular.setText(chofer.getCelular().toString());<br />
                       txtNextel.setText(chofer.getNextel());<br />
                       txtMail.setText(chofer.getMail());<br />
                       btnConfirModificar.setName(codigoChofer);//seteamos los idZona a los botones<br />
                         btnEliminar.setName(codigoChofer);       //para hacer consultas con el idZona</p>
<p>                         jPanel3.add(lblCodigoChofer);<br />
                         jPanel3.add(lblDniChofer);<br />
                         jPanel3.add(lblNombreChofer);<br />
                         jPanel3.add(lblApellidoChofer);<br />
                         jPanel3.add(lblDireccionChofer);<br />
                         jPanel3.add(lblCpChofer);<br />
                         jPanel3.add(lblIdLocalidadChofer);<br />
                         jPanel3.add(lblTelParticularChofer);<br />
                         jPanel3.add(lblCelularChofer);<br />
                         jPanel3.add(lblNextelChofer);<br />
                         jPanel3.add(lblMailChofer);</p>
<p>                         jPanel3.add(lblVacio);<br />
                         jPanel3.add(lblVacio1);<br />
                         jPanel3.add(txtCodigo);<br />
                         jPanel3.add(txtDni);<br />
                         jPanel3.add(txtNombre);<br />
                         jPanel3.add(txtApellido);<br />
                         jPanel3.add(txtDireccion);<br />
                         jPanel3.add(txtCp);<br />
                         jPanel3.add(txtIdLocalidad);<br />
                         jPanel3.add(txtTelParticular);<br />
                         jPanel3.add(txtCelular);<br />
                         jPanel3.add(txtNextel);<br />
                         jPanel3.add(txtMail);</p>
<p>                         jPanel3.add(btnConfirModificar);<br />
                         jPanel3.add(btnEliminar);<br />
                         jPanel3.setBackground(Color.GRAY);<br />
                         jPanel3.setLayout(new GridLayout(Chofer_DTO.listarChoferes().size()*2,12,5,5));</p>
<p>                         //metodos de eventos de la lista de choferES<br />
                         btnConfirModificar.addActionListener(new ActionListener() {<br />
                                   @Override<br />
                                   public void actionPerformed(ActionEvent e) {<br />
                                        int id =Integer.parseInt(btnConfirModificar.getName());<br />
                                        Chofer chofer;<br />
                                        try {<br />
                                             chofer = (Chofer) Chofer_DTO.listarChoferes();<br />
                                             //jPanel3.setVisible(true);<br />
                                             AdministracionChoferesPopUp(id,chofer.getNombre());</p>
<p>                                        } catch (Exception e1) {<br />
                                             System.out.println("error " + e1.getMessage());</p>
<p>                                   }<br />
                         }});</p>
<p>                         btnEliminar.addActionListener(new ActionListener() {<br />
                              @Override<br />
                              public void actionPerformed(ActionEvent e) {<br />
                                   int id =Integer.parseInt(btnEliminar.getName());<br />
                                   Chofer chofer;<br />
                                   boolean estado;</p>
<p>                                        try {<br />
                                             estado = Chofer_DTO.borrarChofer(id);<br />
                                        } catch (ConnectException e1) {<br />
                                             // TODO Auto-generated catch block<br />
                                             e1.printStackTrace();<br />
                                        }</p>
<p>                                   if(estado = true){<br />
                                             JOptionPane.showMessageDialog(null,"Operación exitosa","info",JOptionPane.INFORMATION_MESSAGE);</p>
<p>                                   }<br />
                                   else{<br />
                                        JOptionPane.showMessageDialog(null,"no se pudo realizar la operación","Error",JOptionPane.ERROR_MESSAGE);<br />
                                   }<br />
                              }<br />
                         }</p>
<p>                         );</p>
<p>                         first = false;<br />
                    }</p>
<p>                 // jPanel3.setVisible(true);<br />
              scroll.add(jPanel3);<br />
                 scroll.setVisible(true);<br />
                 super.add(scroll,BorderLayout.CENTER);</p>
<p>              }catch(Exception e){</p>
<p>              }</p>
<p>       }</p>
<p>Alguien sabe si lo puedo solucionar y como?</p>
<p>Saludos!
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "control de  fechas"</title>
			<link>http://www.dudasprogramacion.com/topic/control-de-fechas#post-1021</link>
			<pubDate>Mon, 30 Jan 2012 07:15:17 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">1021@http://www.dudasprogramacion.com/</guid>
			<description><p>@johk0563,</p>
<p>La idea es pasar las dos fechas a milisegundos, restar sus valores y el resultado convertirlo a días.</p>
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>form<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>label <span style="color: #000066; font-weight: bold;">for</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;dia&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;dia&quot;</span> size<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;2&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;01&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>label<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;/</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>label <span style="color: #000066; font-weight: bold;">for</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;mes&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;mes&quot;</span> size<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;2&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;02&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>label<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;/</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>label <span style="color: #000066; font-weight: bold;">for</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;annio&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;annio&quot;</span> size<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;4&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;2012&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>label<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>button id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;calcular&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>Comparar con fecha del Sistema<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>button<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>form<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>span id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;fecha&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>span<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>script<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> boton <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;calcular&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
boton.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;click&quot;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
  dia <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;dia&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
  mes <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;mes&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
  annio <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;annio&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
&nbsp;
  fecha_texto <span style="color: #339933;">=</span> annio<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #339933;">+</span>mes<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #339933;">+</span>dia<span style="color: #339933;">;</span>
&nbsp;
  fecha <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  ms <span style="color: #339933;">=</span> Date.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>fecha_texto<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  fecha2 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span>ms<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  one_day<span style="color: #339933;">=</span><span style="color: #CC0000;">1000</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">*</span><span style="color: #CC0000;">24</span><span style="color: #339933;">;</span>
  diferencia <span style="color: #339933;">=</span> Math.<span style="color: #660066;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>fecha.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>fecha2.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span>one_day<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  texto <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>diferencia<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">?</span><span style="color: #3366CC;">&quot;Hace &quot;</span> <span style="color: #339933;">+</span> diferencia<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Dentro de &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>diferencia<span style="color: #339933;">*-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fecha&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> texto <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; dias.&quot;</span><span style="color: #339933;">;</span>
  ev.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>script<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span></pre>
<p>Te hemos dejado el código explicado en<br />
<a href="http://lineadecodigo.com/javascript/comparar-con-la-fecha-del-sistema-en-javascript/" rel="nofollow">http://lineadecodigo.com/javascript/comparar-con-la-fecha-del-sistema-en-javascript/</a></p>
<p>Espero que te sea de utilidad.
</p></description>
		</item>
		<item>
			<title>Jockzan on "No sé como inicializar un arrayList  en Java?"</title>
			<link>http://www.dudasprogramacion.com/topic/no-se-como-inicializar-un-arraylist-en-java#post-1020</link>
			<pubDate>Sun, 29 Jan 2012 03:25:35 +0000</pubDate>
			<dc:creator>Jockzan</dc:creator>
			<guid isPermaLink="false">1020@http://www.dudasprogramacion.com/</guid>
			<description><p>Requieres hacer mas explicita tu duda...pero a como yo te entiendo, tu metodo de "iniciarArrayAsiganturas()" debe de regresar un ArrayList&#60;Asignatura&#62;, si es asi de sencillo como lo pones, solo tendrias que igual:</p>
<pre class="java" style="font-family:monospace;">ArrayList<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>Asignatura<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;</span> nombre_del_araylist <span style="color: #339933;">=</span> inicarArrayAsignaturas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
<p>tomando como ejemplo que tengas algun metodo de este estilo:</p>
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> ArrayList<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>Asignatura<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;</span> iniciarArrayAsignaturas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
       ArrayList<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>Asignatura<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;</span> aux <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>Asignatura<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #666666; font-style: italic;">//cuerpo de tu metodo</span>
       <span style="color: #000000; font-weight: bold;">return</span> aux<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
<p>Espero y esto sirva para resolver tu duda...si no, al menos hice el intento de entenderte jajajaja. Saludos
</p></description>
		</item>
		<item>
			<title>novato666 on "No sé como inicializar un arrayList  en Java?"</title>
			<link>http://www.dudasprogramacion.com/topic/no-se-como-inicializar-un-arraylist-en-java#post-1019</link>
			<pubDate>Fri, 27 Jan 2012 22:56:13 +0000</pubDate>
			<dc:creator>novato666</dc:creator>
			<guid isPermaLink="false">1019@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola:</p>
<p>Mira que no sé como hacer un método dentro de una clase, en mi caso k es lo kiero implementar? Espero k m echeis una mano y muchas gracias de antemano.</p>
<p>public ArrayList&#60;Asignatura&#62;iniciarArrayAsignaturas()
</p></description>
		</item>
		<item>
			<title>lopera607 on "JAVA - Algoritmo de Polybios - no entra en un &quot;if&quot;"</title>
			<link>http://www.dudasprogramacion.com/topic/java-algoritmo-de-polybios-no-entra-en-un-if#post-1018</link>
			<pubDate>Mon, 16 Jan 2012 14:49:43 +0000</pubDate>
			<dc:creator>lopera607</dc:creator>
			<guid isPermaLink="false">1018@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas proporciono todo el codigo con sus comentarios:<br />
- Codificador.<br />
- Decodificador.<br />
<code><br />
public class polybios1 {</p>
<p>	private static final String LeerMatriz = null;<br />
	static String Frase = "";<br />
	static String ArrayAbecedario[][]={<br />
	         {"a","b","c","d","e"},<br />
	         {"f","g","h","i","k"},<br />
	         {"l","m","n","o","p"},<br />
	         {"q","r","s","t","u"},<br />
	         {"v","w","x","y","z"}<br />
	            }; </p>
<p>	public static void main(String[] args) {</p>
<p>	//Solicitamos frase para cifrar<br />
	solicitaFrase();<br />
	//Creo un array con la longitud de la frase o palabra introducida<br />
	String FraseParaCifrar[];<br />
	FraseParaCifrar = new String [Frase.length()];<br />
	//Relleno el array de FraseParaCifrar con la Frase introducida<br />
	RellenaMatriz(FraseParaCifrar, Frase);<br />
	//Esto es una prueba para comprobar que el array contiene la frase<br />
    MostrarFraseParaCifrar(FraseParaCifrar);<br />
    //Este metodo compara el array de abecedario y el de la Frase introducida<br />
    //y da como resultado la posicion de la letra en el arrayAbecedario<br />
    Encriptar(FraseParaCifrar, ArrayAbecedario);<br />
	}<br />
	private static void Encriptar(String[] fraseParaCifrar, String[][] ArrayAbecedario) {</p>
<p>		//Creo una variable que es la que almacena las posiciones<br />
		String resultado[];<br />
		resultado = new String [fraseParaCifrar.length];<br />
		//creo dos variables aqui para poder utilizarlas en los 3 for<br />
		int fila = 0;<br />
		int columna = 0;<br />
		//Recorro fila y columna con estos dos bucles del ArrayAbecedario<br />
		for (fila = 0; fila &#60;= 4; fila++){<br />
			for (columna = 0; columna &#60;= 4; columna++){<br />
				//Recorro el array fraseParaCifrar<br />
				for (int o = 0;o &#60; fraseParaCifrar.length; o++){<br />
				//Compruebo si son iguales<br />
				if (fraseParaCifrar[o].equals(ArrayAbecedario[fila][columna])){<br />
				//si son iguales pues me guarda en array Resultado las posiciones<br />
					String filaString= String.valueOf(fila);<br />
					String columnaString= String.valueOf(columna);<br />
					String posicion = "";<br />
					posicion = filaString + columnaString;<br />
					resultado[o]= posicion;<br />
				}<br />
					}<br />
						}<br />
							}<br />
	//mostrando resultado<br />
	for(int y = 0; y &#60; resultado.length;y++){<br />
				System.out.print(resultado[y]);</p>
<p>													}<br />
							}</p>
<p>	private static void MostrarFraseParaCifrar(String[] fraseParaCifrar) {<br />
    //Esto es una prueba para comprobar el contenido del Array fraseParaCifrar<br />
	for (int i = 0; i &#60; Frase.length();i++ ){<br />
    //System.out.println(fraseParaCifrar[i]);<br />
    										}</p>
<p>																			}<br />
	private static void RellenaMatriz(String[] fraseParaCifrar, String frase) {<br />
		//Recorro la frase introducida letra por letra y voy introduciendola<br />
		//en el array fraseParaCifrar<br />
		for (int i = 0; i &#60; frase.length();i++ ){<br />
			char letraChar = frase.charAt(i);<br />
			String letraString = Character.toString(letraChar);<br />
			fraseParaCifrar[i] = letraString;<br />
										}<br />
																				}<br />
	private static void solicitaFrase() {<br />
		//Solicito al usuario que introduzca la frase para codificarla<br />
		Scanner sc = new Scanner(System.in);<br />
        System.out.println("Introduce frase para cifrar solo letras y que no tengan espacios: ");<br />
        Frase = sc.nextLine();</p>
<p>										}<br />
}<br />
</code><br />
_______________________________________________________________________________________</p>
<p><code><br />
public class Polybios_decodificador {</p>
<p>	static String ArrayAbecedario[][]={<br />
        {"a","b","c","d","e"},<br />
        {"f","g","h","i","k"},<br />
        {"l","m","n","o","p"},<br />
        {"q","r","s","t","u"},<br />
        {"v","w","x","y","z"}<br />
           };<br />
	static String codificado = "12232000022321230432330032432301130422433334";<br />
	public static void main(String[] args) {<br />
		// Sacar el contenido del ArrayAbecedario con las posiciones que nos proporciona<br />
		//la variable codificado<br />
		//Creo dos variables para luego introducirlas como posiciones en el ArrayAbecedario<br />
		int uno = 0;<br />
		int dos = 0;<br />
		//Recorro todas las letras de la variable codificado<br />
		for (int i = 0;i &#60; codificado.length();i++){<br />
			//Si es par la posicion en la variable se guarda como entero en la variable uno<br />
			if (i%2 == 0){<br />
				char letraPar = codificado.charAt(i);<br />
				char c = letraPar;<br />
				uno = c - 48;//48 es el 0 en ASCII<br />
			}<br />
			//Y si no es par, es impar la posicion pues lo mete el valor en dos<br />
			else {<br />
				char letraImpar = codificado.charAt(i);<br />
				char c = letraImpar;<br />
				dos = c - 48;//48 es el 0 en ASCII<br />
			//Solo muestro cuando llegamos a una posicion de la variable impar<br />
			System.out.print(ArrayAbecedario[uno][dos]);<br />
			}</p>
<p>		}<br />
		}</p>
<p>}<br />
</code>
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "La hora del sistema queda estatica, no avanza los minutos ni segundos"</title>
			<link>http://www.dudasprogramacion.com/topic/la-hora-del-sistema-queda-estatica-no-avanza-los-minutos-ni-segundos#post-1017</link>
			<pubDate>Mon, 16 Jan 2012 00:02:15 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">1017@http://www.dudasprogramacion.com/</guid>
			<description><p>Si estás utilizando Swing puedes utilizar un Timer.</p>
<pre class="java" style="font-family:monospace;"><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Atimer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Timer</span></a> t <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Atimer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Timer</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1000</span>, actualizarReloj<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
t.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionlistener+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionListener</span></a> actualizarReloj <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionlistener+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionListener</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> actionPerformed<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionEvent</span></a> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// Actualiza el reloj</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></description>
		</item>
		<item>
			<title>admin on "JAVA - Algoritmo de Polybios - no entra en un &quot;if&quot;"</title>
			<link>http://www.dudasprogramacion.com/topic/java-algoritmo-de-polybios-no-entra-en-un-if#post-1016</link>
			<pubDate>Sun, 15 Jan 2012 23:52:40 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">1016@http://www.dudasprogramacion.com/</guid>
			<description><p>@lopera607,</p>
<p>Muchas gracias por compartir la resolución con nosotros.
</p></description>
		</item>
		<item>
			<title>lopera607 on "JAVA - Algoritmo de Polybios - no entra en un &quot;if&quot;"</title>
			<link>http://www.dudasprogramacion.com/topic/java-algoritmo-de-polybios-no-entra-en-un-if#post-1015</link>
			<pubDate>Sun, 15 Jan 2012 18:34:13 +0000</pubDate>
			<dc:creator>lopera607</dc:creator>
			<guid isPermaLink="false">1015@http://www.dudasprogramacion.com/</guid>
			<description><p>RESUELTO </p>
<p>Pongo el codigo que tenia erroneo, correjido.</p>
<pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> Encriptar<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> fraseParaCifrar, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> ArrayAbecedario<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> resultado<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> o <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>o <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> o<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//System.out.print(fraseParaCifrar[o]+&quot;-&quot;);</span>
		<span style="color: #009900;">&#125;</span>
		resultado <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> <span style="color: #009900;">&#91;</span>fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> fila <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> columna <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>fila <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> fila <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span> fila<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>columna <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> columna <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span> columna<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #666666; font-style: italic;">//System.out.print(ArrayAbecedario[fila][columna]);</span>
				<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> o <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>o <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> o<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fila+&quot;&quot;+columna);</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fraseParaCifrar[1]);</span>
			    <span style="color: #666666; font-style: italic;">//System.out.println(fraseParaCifrar[0]);</span>
			    <span style="color: #666666; font-style: italic;">//System.out.println(cadenaAbecedario + &quot; &quot; + cadenaFrase);</span>
				<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>fraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>ArrayAbecedario<span style="color: #009900;">&#91;</span>fila<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>columna<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(&quot;es igual&quot;);</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fila+&quot;&quot;+columna);</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> filaString<span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>fila<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> columnaString<span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>columna<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> posicion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					posicion <span style="color: #339933;">=</span> filaString <span style="color: #339933;">+</span> columnaString<span style="color: #339933;">;</span>
					resultado<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span> posicion<span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
&nbsp;</pre></description>
		</item>
		<item>
			<title>lopera607 on "JAVA - Algoritmo de Polybios - no entra en un &quot;if&quot;"</title>
			<link>http://www.dudasprogramacion.com/topic/java-algoritmo-de-polybios-no-entra-en-un-if#post-1014</link>
			<pubDate>Sun, 15 Jan 2012 10:07:32 +0000</pubDate>
			<dc:creator>lopera607</dc:creator>
			<guid isPermaLink="false">1014@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas y ante todo gracias a todos, mi duda es que en el metodo "Encriptar" no me entra al "if", y compruebo las variables String "cadenaAbecedario" y "cadenaFrase" y contienen los datos correctos pero no se por que no entra en la conficion "if", y si la comento, me ejecuta el codigo que contiene if, y le mete al array "resultado", la ultima posición "44" del "ArrayAbecedario", concatena fila y columna.</p>
<pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Scanner</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> polybios1 <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> LeerMatriz <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> Frase <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> ArrayAbecedario<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #009900;">&#123;</span>
	         <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;a&quot;</span>,<span style="color: #0000ff;">&quot;b&quot;</span>,<span style="color: #0000ff;">&quot;c&quot;</span>,<span style="color: #0000ff;">&quot;d&quot;</span>,<span style="color: #0000ff;">&quot;e&quot;</span><span style="color: #009900;">&#125;</span>,
	         <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;f&quot;</span>,<span style="color: #0000ff;">&quot;g&quot;</span>,<span style="color: #0000ff;">&quot;h&quot;</span>,<span style="color: #0000ff;">&quot;i&quot;</span>,<span style="color: #0000ff;">&quot;k&quot;</span><span style="color: #009900;">&#125;</span>,
	         <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;l&quot;</span>,<span style="color: #0000ff;">&quot;m&quot;</span>,<span style="color: #0000ff;">&quot;n&quot;</span>,<span style="color: #0000ff;">&quot;o&quot;</span>,<span style="color: #0000ff;">&quot;p&quot;</span><span style="color: #009900;">&#125;</span>,
	         <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;q&quot;</span>,<span style="color: #0000ff;">&quot;r&quot;</span>,<span style="color: #0000ff;">&quot;s&quot;</span>,<span style="color: #0000ff;">&quot;t&quot;</span>,<span style="color: #0000ff;">&quot;u&quot;</span><span style="color: #009900;">&#125;</span>,
	         <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;v&quot;</span>,<span style="color: #0000ff;">&quot;w&quot;</span>,<span style="color: #0000ff;">&quot;x&quot;</span>,<span style="color: #0000ff;">&quot;y&quot;</span>,<span style="color: #0000ff;">&quot;z&quot;</span><span style="color: #009900;">&#125;</span>
	            <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> 
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Solicitamos frase para cifrar</span>
	solicitaFrase<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> FraseParaCifrar<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	FraseParaCifrar <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> <span style="color: #009900;">&#91;</span>Frase.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	RellenaMatriz<span style="color: #009900;">&#40;</span>FraseParaCifrar, Frase<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    MostrarFraseParaCifrar<span style="color: #009900;">&#40;</span>FraseParaCifrar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    Encriptar<span style="color: #009900;">&#40;</span>FraseParaCifrar, ArrayAbecedario<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> Encriptar<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> fraseParaCifrar, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> ArrayAbecedario<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> resultado<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> o <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>o <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> o<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>fraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		resultado <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> <span style="color: #009900;">&#91;</span>fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> fila <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> columna <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>fila <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> fila <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span> fila<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>columna <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> columna <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span> columna<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">//System.out.print(ArrayAbecedario[fila][columna]);</span>
				<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> cadenaAbecedario <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
				cadenaAbecedario <span style="color: #339933;">=</span> ArrayAbecedario<span style="color: #009900;">&#91;</span>fila<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>columna<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> o <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>o <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> fraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> o<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fila+&quot;&quot;+columna);</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fraseParaCifrar[1]);</span>
			    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> cadenaFrase <span style="color: #339933;">=</span> fraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>fraseParaCifrar<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cadenaAbecedario <span style="color: #339933;">==</span> cadenaFrase<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #666666; font-style: italic;">//System.out.println(fila+&quot;&quot;+columna);</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> filaString<span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>fila<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> columnaString<span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>columna<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> posicion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
					posicion <span style="color: #339933;">=</span> filaString <span style="color: #339933;">+</span> columnaString<span style="color: #339933;">;</span>
					resultado<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span> posicion<span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> y <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> y <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> resultado.<span style="color: #006633;">length</span><span style="color: #339933;">;</span>y<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>resultado<span style="color: #009900;">&#91;</span>y<span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #666666; font-style: italic;">//resultado[y] = resultado[y] *19*58*86*74 ;</span>
				<span style="color: #666666; font-style: italic;">//System.out.print(resultado[y]+&quot;,&quot;);</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> MostrarFraseParaCifrar<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> fraseParaCifrar<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> Frase.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    	<span style="color: #666666; font-style: italic;">//System.out.print(fraseParaCifrar[i]);</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> RellenaMatriz<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> fraseParaCifrar, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> frase<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> frase.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">char</span> letraChar <span style="color: #339933;">=</span> frase.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> letraString <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acharacter+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Character</span></a>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span>letraChar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			fraseParaCifrar<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> letraString<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> solicitaFrase<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		Scanner sc <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Scanner<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">in</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Introduce frase para cifrar solo letras: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Frase <span style="color: #339933;">=</span> sc.<span style="color: #006633;">nextLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;</pre></description>
		</item>
		<item>
			<title>enmanuel on "La hora del sistema queda estatica, no avanza los minutos ni segundos"</title>
			<link>http://www.dudasprogramacion.com/topic/la-hora-del-sistema-queda-estatica-no-avanza-los-minutos-ni-segundos#post-1013</link>
			<pubDate>Sat, 14 Jan 2012 20:52:03 +0000</pubDate>
			<dc:creator>enmanuel</dc:creator>
			<guid isPermaLink="false">1013@http://www.dudasprogramacion.com/</guid>
			<description><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">int</span> hora, minutos, segundos<span style="color: #339933;">;</span>
&nbsp;
hora <span style="color: #339933;">=</span>calendario.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Calendar</span></a>.<span style="color: #006633;">HOUR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
minutos <span style="color: #339933;">=</span> calendario.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Calendar</span></a>.<span style="color: #006633;">MINUTE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
segundos <span style="color: #339933;">=</span> calendario.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acalendar+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Calendar</span></a>.<span style="color: #006633;">SECOND</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
lblHora.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>hora <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">+</span> minutos <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">+</span> segundos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
<p>ESE ES MI CODIGO PARA OBTENER LA HORA, PERO SE QUEDA ESTATICA... COMO HAGO PARA QUE LOS SEGUNDOS MINUTOS Y HORA SIGAN AVANZANDO??????
</p></description>
		</item>
		<item>
			<title>Ari_lineadcodigo on "Crear Formularios dinámicos en javascript"</title>
			<link>http://www.dudasprogramacion.com/topic/crear-formularios-dinamicos-en-javascript#post-1012</link>
			<pubDate>Sun, 08 Jan 2012 23:33:34 +0000</pubDate>
			<dc:creator>Ari_lineadcodigo</dc:creator>
			<guid isPermaLink="false">1012@http://www.dudasprogramacion.com/</guid>
			<description><p>Bueno mi pregunta era como crear formularios dinámicos en javascript con las funciones que me mostrataron en linea de código.<br />
<a href="http://lineadecodigo.com/javascript/crear-elementos-html-con-javascript/" rel="nofollow">http://lineadecodigo.com/javascript/crear-elementos-html-con-javascript/</a></p>
<p>     Despues de investegar encontre cuales eran metodos que requeria dentro de mi función en javascript para lograr resolver mi problema pero ahora mi problema es el siguiente como obtengo el valor ingresado en la caja de texto que se genero dinámica mente por el usuario para despues guardarlo en una variable en php.</p>
<p>La función que cree en javascript es la siguiente:</p>
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>SCRIPT type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> contador<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> poner<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> lista <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tipo&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #003366; font-weight: bold;">var</span> valor <span style="color: #339933;">=</span> lista.<span style="color: #660066;">options</span><span style="color: #009900;">&#91;</span>lista.<span style="color: #660066;">selectedIndex</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">text</span>
<span style="color: #003366; font-weight: bold;">var</span> lugar <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;colocar_tipo&quot;</span><span style="color: #009900;">&#41;</span>
valor.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>valor<span style="color: #339933;">==</span><span style="color: #3366CC;">'Otro'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">38</span><span style="color: #339933;">;</span> contador<span style="color: #339933;">==</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	contador<span style="color: #339933;">++;</span>
<span style="color: #003366; font-weight: bold;">var</span> elemento <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'input'</span><span style="color: #009900;">&#41;</span>
elemento.<span style="color: #660066;">type</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span>
elemento.<span style="color: #000066;">name</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;ntipo&quot;</span>
elemento.<span style="color: #660066;">id</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;ntipo&quot;</span>
ntipo
lugar.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>elemento<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'colocar_tipo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span><span style="color: #3366CC;">''</span>
contador<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;/</span>SCRIPT<span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">62</span><span style="color: #339933;">;</span></pre>
<p>Bueno en mi formulario la implemento en un select con el evento onchange</p>
<p>el código seria el siguiente:</p>
<pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;form id=&quot;form1&quot; name=&quot;form1&quot; method=&quot;POST&quot; action=&quot;&amp;#60;?php echo $editFormAction; ?&amp;#62;&amp;#60;?php echo $editFormAction; ?&amp;#62;&quot;&amp;#62;
</span>        <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;p&amp;#62;
</span>          <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;label for=&quot;select&quot;&amp;#62;Tipo:&amp;#60;/label&amp;#62;
</span>          <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;select name=&quot;tipo&quot; id=&quot;tipo&quot; onchange=&quot;poner()&quot;&amp;#62;
</span>            <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;option value=&quot;Zandalia&quot;&amp;#62;Zandalia&amp;#60;/option&amp;#62;
</span>            <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;option value=&quot;otro&quot;&amp;#62;Otro&amp;#60;/option&amp;#62;
</span>            <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;option value=&quot;Zapatos&quot; selected=&quot;selected&quot;&amp;#62;Zapatos&amp;#60;/option&amp;#62;
</span>            <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;option value=&quot;Tenis&quot;&amp;#62;Tenis&amp;#60;/option&amp;#62;
</span>          <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;/select&amp;#62;
</span>        <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#60;div id=&quot;colocar_tipo&quot;&amp;#62;&amp;#60;/div&amp;#62;</span></pre>
<p>Ahora quiero saber como sacar el valor de caja de texto que estoy creado en la función poner() la cual tiene el nombre de ntipo y guardarlo en una variable en php</p>
<p>Gracias de antemano por leer y darse un tiempo para intentar ayudarme
</p></description>
		</item>
		<item>
			<title>jark on "Problemas java"</title>
			<link>http://www.dudasprogramacion.com/topic/problemas-java#post-1010</link>
			<pubDate>Fri, 23 Dec 2011 10:45:58 +0000</pubDate>
			<dc:creator>jark</dc:creator>
			<guid isPermaLink="false">1010@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola, necesito saber cómo se resuelve esta práctica cuanto antes, disculpad si parece mucho, pero es que no me queda otra opción, no consigo sacar el código.</p>
<p>3)-- Introducir un objeto Tablero en RellenarPorAlumno: Se deberá modificar la clase<br />
RellenarPorAlumno para introducir un tablero de juego. Para ello se deberá:<br />
• Añadir un atributo elTablero: Objeto de tipo Tablero, añadido como atributo a la<br />
clase RellenarPorAlumno. Se deberá inicializar el atributo elTablero en el<br />
método main, para ello dentro del método main de RellenarPorAlumno se crea<br />
un objeto denominado tmp. Deberá inicializarse la variable elTablero del objeto<br />
tmp, creando un nuevo tablero de juego que contenga las siguientes casillas:</p>
<p>(Aquí iría el array de caracteres que ya tengo)</p>
<p>Nota: Deberá inicializarse antes de la llamada al método<br />
establecerCoordenadas que aparece en el código, si no se producirá una<br />
excepción.</p>
<p>-- Modificar el método pintarTablero”: Modificar este método para que en lugar de<br />
pintar casillas aleatorias, pinte el tablero contenido en la variable elTablero.</p>
<p>4) Modificar el método teclaPulsada en RellenarPorAlumno: Se deberá modificar el<br />
método teclaPulsada de la clase RellenarPorAlumno para que si se pulsa cualquiera de<br />
las teclas A,W,D,X se realice lo siguiente:<br />
• Mover el jugador: se realizará el movimiento oportuno sobre elTablero.<br />
• Incrementar el contador de pasos: Sólo si se ha podido realizar el movimiento,<br />
se incrementará el contador de pasos.<br />
• Comprobar si se ha ganado la partida: Si se ha ganado la partida, se finalizará<br />
el programa.</p>
<p>Esos serían los dos apartados a resolver (incluyendo las dos secciones que tiene el punto 3)</p>
<p>El código dónde debo hacer esto es el siguiente:</p>
<pre class="java" style="font-family:monospace;">@SuppressWarnings<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;serial&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> RellenarPorAlumno <span style="color: #000000; font-weight: bold;">extends</span> NoTocarEstaClase <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Método main
     */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	RellenarPorAlumno tmp <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RellenarPorAlumno<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	tmp.<span style="color: #006633;">elTablero</span><span style="color: #009900;">&#40;</span>x, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	tmp.<span style="color: #006633;">establecerCoodenadas</span><span style="color: #009900;">&#40;</span>ANCHO, ALTO<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #008000; font-style: italic; font-weight: bold;">/** Enumeración para tipos de casilla */</span>
	<span style="color: #000000; font-weight: bold;">enum</span> TipoCasilla <span style="color: #009900;">&#123;</span>VACIA, CAJA,
		JUGADOR, MURO, DESTINO,
		CAJA_SOBRE_DESTINO, JUGADOR_SOBRE_DESTINO	<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Definición de constantes para dimensiones del tablero</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> ANCHO <span style="color: #339933;">=</span> <span style="color: #cc66cc;">19</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> ALTO <span style="color: #339933;">=</span> <span style="color: #cc66cc;">11</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Método que es invocado cada vez que el usuario pulsa cualquier tecla
     * La implementación que se proporciona sólo responde a la tecla 'q', que
     * hace que finalice la ejecución del programa
     * Si no se pulsa la tecla q, genera casillas aleatorias en el tablero y lo repinta
     * EL CÓDIGO QUE SE PROPORCIONA ES SÓLO UN EJEMPLO, YA QUE ESTE MÉTODO DEBERÁ
     * SER ESCRITO POR COMPLETO POR EL ALUMNO PARA REALIZAR LAS CUESTIONES
     * QUE SE PLANTEAN EN LA PRÁCTICA 3
     * @param tecla La tecla pulsada
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> teclaPulsada<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">char</span> tecla<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #666666; font-style: italic;">// En función de la tecla pulsada hace algo</span>
        <span style="color: #000000; font-weight: bold;">switch</span> <span style="color: #009900;">&#40;</span>tecla<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #0000ff;">'q'</span><span style="color: #339933;">:</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #0000ff;">'Q'</span><span style="color: #339933;">:</span>
                <span style="color: #666666; font-style: italic;">// Si se pulsa la tecla q sale del programa</span>
                <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">default</span><span style="color: #339933;">:</span>
                <span style="color: #666666; font-style: italic;">// Por defecto no hace nada</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Método para pintar el tablero de juego.
     * Deberá hacer uso del método pintarCuadradoTablero para pintarlo
     * EL CÓDIGO QUE SE PROPORCIONA ES SÓLO UN EJEMPLO, YA QUE ESTE MÉTODO DEBERÁ
     * SER ESCRITO POR COMPLETO POR EL ALUMNO PARA REALIZAR LAS CUESTIONES
     * QUE SE PLANTEAN EN LA PRÁCTICA 3
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> pintarTablero<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Ejemplo que rellena cada cuadrado del tablero con un tipo de casilla aleatoria</span>
        <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> ALTO<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> j<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> j<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>ANCHO<span style="color: #339933;">;</span> j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                TipoCasilla tipoCasilla <span style="color: #339933;">=</span> obtenerTipoCasillaAleatoria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                pintarCuadradoTablero<span style="color: #009900;">&#40;</span>j, i, tipoCasilla<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Ejemplo que incrementa los pasos un valor de 10</span>
        <span style="color: #000066; font-weight: bold;">int</span> pasos <span style="color: #339933;">=</span> obtenerPasos<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        pasos <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
        establecerPasos<span style="color: #009900;">&#40;</span>pasos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Método auxiliar de ejemplo para obtener un tipo de casilla aleatoria
     * ESTE MÉTODO PUEDE SER ELIMINADO POR EL ALUMNO, ES SÓLO UN EJEMPLO
     */</span>
    <span style="color: #000000; font-weight: bold;">private</span> TipoCasilla obtenerTipoCasillaAleatoria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	<span style="color: #666666; font-style: italic;">// Genera un número aleatorio entre 0 y 6</span>
        <span style="color: #000066; font-weight: bold;">int</span> tipoCasilla <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        TipoCasilla t<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>tipoCasilla<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">:</span>
                t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">VACIA</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">CAJA</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">JUGADOR</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">MURO</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">DESTINO</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">CAJA_SOBRE_DESTINO</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">default</span><span style="color: #339933;">:</span>
            	t <span style="color: #339933;">=</span> TipoCasilla.<span style="color: #006633;">JUGADOR_SOBRE_DESTINO</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">return</span> t<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
<p>________________________________________________________________________________________</p>
<p>Gracias.</p>
<p>Saludos.
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "(JAVA)Un metodo no me coje el array que viene de un Scanner"</title>
			<link>http://www.dudasprogramacion.com/topic/javaun-metodo-no-me-coje-el-array-que-viene-de-un-scanner#post-1004</link>
			<pubDate>Mon, 19 Dec 2011 08:45:24 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">1004@http://www.dudasprogramacion.com/</guid>
			<description><p>@lopera607,</p>
<p>El problema lo tienes en las comparaciones de las cadenas. Para comparar cadenas no hay que utilizar el operador ==. Lo que hay que utilizar es el método .equals()</p>
<p>Tienes que cambiar el código:</p>
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>abecedario<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> FraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span></pre>
<p>Por el siguiente código:</p>
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>abecedario<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>FraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></description>
		</item>
		<item>
			<title>lopera607 on "(JAVA)Un metodo no me coje el array que viene de un Scanner"</title>
			<link>http://www.dudasprogramacion.com/topic/javaun-metodo-no-me-coje-el-array-que-viene-de-un-scanner#post-1003</link>
			<pubDate>Sun, 18 Dec 2011 16:39:38 +0000</pubDate>
			<dc:creator>lopera607</dc:creator>
			<guid isPermaLink="false">1003@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas mi duda es que mi metodo "codificar", no me coje el array "FraseParaCifrar", que viene de un "Scanner", en cambio si se lo paso manualmente si me dice las posiciones la que se encuentra respecto al array "abecedario", el array comentado llamado "Cifrar", se lo paso al metodo "codificar", en vez de "FraseParaCifrar" y si me da las posiciones<br />
{h,o} me da el 7,14.<br />
Gracias a todos. </p>
<pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> codifica <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * @param args
	 */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> Frase <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> Frase1 <span style="color: #339933;">=</span> LeerMatriz<span style="color: #009900;">&#40;</span>Frase<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> FraseParaCifrar<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		FraseParaCifrar <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> <span style="color: #009900;">&#91;</span>Frase1.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
		RellenaMatriz<span style="color: #009900;">&#40;</span>FraseParaCifrar, Frase1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//String Cifrar[] = {&quot;h&quot;,&quot;o&quot;};</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> abecedario<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;a&quot;</span>,<span style="color: #0000ff;">&quot;b&quot;</span>,<span style="color: #0000ff;">&quot;c&quot;</span>,<span style="color: #0000ff;">&quot;d&quot;</span>,<span style="color: #0000ff;">&quot;e&quot;</span>,<span style="color: #0000ff;">&quot;f&quot;</span>,<span style="color: #0000ff;">&quot;g&quot;</span>,<span style="color: #0000ff;">&quot;h&quot;</span>,<span style="color: #0000ff;">&quot;i&quot;</span>,<span style="color: #0000ff;">&quot;j&quot;</span>,<span style="color: #0000ff;">&quot;k&quot;</span>,<span style="color: #0000ff;">&quot;l&quot;</span>,<span style="color: #0000ff;">&quot;m&quot;</span>,<span style="color: #0000ff;">&quot;n&quot;</span>,<span style="color: #0000ff;">&quot;o&quot;</span>,<span style="color: #0000ff;">&quot;p&quot;</span>,<span style="color: #0000ff;">&quot;q&quot;</span>,<span style="color: #0000ff;">&quot;r&quot;</span>,<span style="color: #0000ff;">&quot;s&quot;</span>,<span style="color: #0000ff;">&quot;t&quot;</span>,<span style="color: #0000ff;">&quot;u&quot;</span>,<span style="color: #0000ff;">&quot;v&quot;</span>,<span style="color: #0000ff;">&quot;w&quot;</span>,<span style="color: #0000ff;">&quot;x&quot;</span>,<span style="color: #0000ff;">&quot;y&quot;</span>,<span style="color: #0000ff;">&quot;z&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        codificar<span style="color: #009900;">&#40;</span>FraseParaCifrar, abecedario<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> RellenaMatriz<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> fraseParaCifrar, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> frase<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> frase.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">char</span> letraChar <span style="color: #339933;">=</span> frase.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> letraString <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acharacter+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Character</span></a>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span>letraChar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			fraseParaCifrar<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> letraString<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> LeerMatriz<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> Frase<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    	Scanner sc <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Scanner<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">in</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Introduce frase para cifrar: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Frase <span style="color: #339933;">=</span> sc.<span style="color: #006633;">nextLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">return</span> Frase<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> codificar<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> FraseParaCifrar, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> abecedario<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">int</span> posicion <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> resultado<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		resultado <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span> <span style="color: #009900;">&#91;</span>FraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> abecedario.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> o <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>o <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> FraseParaCifrar.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> o<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>abecedario<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> FraseParaCifrar<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					posicion <span style="color: #339933;">=</span> i<span style="color: #339933;">;</span>
					resultado<span style="color: #009900;">&#91;</span>o<span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span> posicion<span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> y <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> y <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span> resultado.<span style="color: #006633;">length</span><span style="color: #339933;">;</span>y<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>resultado<span style="color: #009900;">&#91;</span>y<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;</pre></description>
		</item>
		<item>
			<title>Torres on "Duda Mysql"</title>
			<link>http://www.dudasprogramacion.com/topic/duda-mysql#post-1002</link>
			<pubDate>Mon, 12 Dec 2011 08:42:44 +0000</pubDate>
			<dc:creator>Torres</dc:creator>
			<guid isPermaLink="false">1002@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas,</p>
<p>Si lo que quieres que se haga al insertar una nueva Celda es algo relacionado con Base de Datos, deberías de utilizar un Trigger. </p>
<p><a href="http://es.wikipedia.org/wiki/Trigger_(base_de_datos)" rel="nofollow">http://es.wikipedia.org/wiki/Trigger_(base_de_datos)</a></p>
<p>Si no, siempre puede ejecutar ese código tras la inserción en BD, si todo ha ido correctamente, o la inserción en Base de Datos no la gestionas desde código?</p>
<p>Un saludo
</p></description>
		</item>
		<item>
			<title>gowLuis on "Duda Mysql"</title>
			<link>http://www.dudasprogramacion.com/topic/duda-mysql#post-1001</link>
			<pubDate>Fri, 09 Dec 2011 20:34:50 +0000</pubDate>
			<dc:creator>gowLuis</dc:creator>
			<guid isPermaLink="false">1001@http://www.dudasprogramacion.com/</guid>
			<description><p>Bueno es la primera vez que comento una pregunta pero no he conseguido la solución a mi problema, les comentare.</p>
<p>La verdad es que no se si se pueda pero segun yo si, ya que para mi todo en la programación se puede.</p>
<p>Alguien sabe de alguna forma para que se este ejecutando un codigo (o metodo) en java cuando ocurra algún cambio en la base de datos? por así decirlo cada vez que se inserte una nueva Celda a una tabla que este mande una notificación y ejecute otro codigo para hacer X cosa?
</p></description>
		</item>
		<item>
			<title>santy.uy on "jQuery.Get error"</title>
			<link>http://www.dudasprogramacion.com/topic/jqueryget-error#post-1000</link>
			<pubDate>Wed, 30 Nov 2011 11:40:32 +0000</pubDate>
			<dc:creator>santy.uy</dc:creator>
			<guid isPermaLink="false">1000@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola, como estan?</p>
<p>Estoy desarrollando una palicación en HTML5 con jQuery, usando Sync Framework para la sincronización, el cual consume un servicio que esta alojado en la en Windows Azure. </p>
<p>El problema esta cuando envio el Request al dicho servicio:</p>
<pre class="lenguaje" style="font-family:monospace;">&nbsp;
var data;
        jQuery.get(serviceUri, {},
            function (data) {
                console.log(&quot; reponse :&quot; + data);
            }
       , &quot;json&quot;);
&nbsp;</pre>
<p>El Request es el siguiente:</p>
<pre class="lenguaje" style="font-family:monospace;">&nbsp;
GET &lt;a href=&quot;http://157.56.8.203/DefaultScopeSyncService.svc/defaultscope/DownloadChanges?id=7AE7C771-0A98-4A5D-A046-430DDB0A7917&quot; rel=&quot;nofollow&quot;&gt;http://157.56.8.203/DefaultScopeSyncService.svc/defaultscope/DownloadChanges?id=7AE7C771-0A98-4A5D-A046-430DDB0A7917&lt;/a&gt; HTTP/1.1
Host: 157.56.8.203
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Accept: application/json, text/javascript, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Referer: &lt;a href=&quot;http://localhost:49427/ListSample.htm&quot; rel=&quot;nofollow&quot;&gt;http://localhost:49427/ListSample.htm&lt;/a&gt;
Origin: &lt;a href=&quot;http://localhost:49427&quot; rel=&quot;nofollow&quot;&gt;http://localhost:49427&lt;/a&gt;
&nbsp;</pre>
<p>Y la respuesta del servicio esta:</p>
<pre class="lenguaje" style="font-family:monospace;">&nbsp;
HTTP/1.1 200 OK
Content-Length: 1388
Content-Type: application/json
Server: Microsoft-IIS/7.0
SyncServiceVersion: 1.0
X-Powered-By: ASP.NET
Date: Wed, 30 Nov 2011 11:34:55 GMT
&nbsp;
{&quot;d&quot;:{&quot;__sync&quot;:{&quot;moreChangesAvailable&quot;:false,&quot;serverBlob&quot;:&quot;AAEAAAD\/\/\/\/\/AQAAAAAAAAAMAgAAAGVNaWNyb3NvZnQuU3luY2hyb25pemF0aW9uLlNlcnZpY2VzLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49ODk4NDVkY2Q4MDgwY2M5MQUBAAAAK01pY3Jvc29mdC5TeW5jaHJvbml6YXRpb24uU2VydmljZXMuU3luY0Jsb2IFAAAAIDxDbGllbnRLbm93bGVkZ2U+a19fQmFja2luZ0ZpZWxkIDxDbGllbnRTY29wZU5hbWU+a19fQmFja2luZ0ZpZWxkHDxJc0xhc3RCYXRjaD5rX19CYWNraW5nRmllbGQaPEJhdGNoQ29kZT5rX19CYWNraW5nRmllbGQaPE5leHRCYXRjaD5rX19CYWNraW5nRmllbGQHAQADAwIBbVN5c3RlbS5OdWxsYWJsZWAxW1tTeXN0ZW0uR3VpZCwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV1tU3lzdGVtLk51bGxhYmxlYDFbW1N5c3RlbS5HdWlkLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAJAwAAAAYEAAAAJGM3NjM2YTlmLTBhOTYtNDJhOC04ZDgxLTBhNDE5NTJmOTUyYgEKCg8DAAAAkAAAAAIAAAAFAAAAAAAAAAEAAAAAAAAABQAAEAAAAALHY2qfCpZCqI2BCkGVL5UrebAhJqekSVCrBoALPwfgsQAAABgAABABKAIAAAEAAAAVAAAAAgAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAQ0AAAAXAAAAAQAAABYAAAABAAMAAAAAAQAAAAAAAAAZAQAAAAAL&quot;},&quot;results&quot;:[{&quot;Id&quot;:&quot;7ae7c771-0a98-4a5d-a046-430ddb0a7917&quot;,&quot;Name&quot;:&quot;Santiago&quot;,&quot;Surname&quot;:&quot;Dalto&quot;,&quot;BirthDate&quot;:&quot;\/Date(917913600000)\/&quot;,&quot;Gender&quot;:&quot;M&quot;,&quot;__metadata&quot;:{&quot;uri&quot;:&quot;http:\/\/157.56.8.203\/DefaultScopeSyncService.svc\/Persons(Id=guid'7ae7c771-0a98-4a5d-a046-430ddb0a7917')&quot;,&quot;type&quot;:&quot;DefaultScope.Persons&quot;}}]}}
&nbsp;</pre>
<p>El problema es que el objeto data del script es siempre null, sin embargo el servicio retorna bien el resultado. Alguien sabe que me puede estar pasando?</p>
<p>Saludos y muchas gracias!
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "Contar Checkbox"</title>
			<link>http://www.dudasprogramacion.com/topic/contar-checkbox-1#post-999</link>
			<pubDate>Mon, 28 Nov 2011 08:42:51 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">999@http://www.dudasprogramacion.com/</guid>
			<description><p>@MostWanted,</p>
<p>La idea es coger el elemento checkbox de un formulario y recorrerlo con un array.</p>
<pre class="javascript" style="font-family:monospace;">document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form1&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkbox</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> x <span style="color: #339933;">&amp;</span>#<span style="color: #CC0000;">60</span><span style="color: #339933;">;</span> checkboxes.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> x<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>checkboxes<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">checked</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  cont <span style="color: #339933;">=</span> cont <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
<p>Tienes todo explicado en <a href="http://lineadecodigo.com/javascript/contar-checkbox-activos-con-javascript/" rel="nofollow">http://lineadecodigo.com/javascript/contar-checkbox-activos-con-javascript/</a></p>
<p>Si bien, si lo tienes dinámico yo te recomiendo un artículo que tenemos que te explica como convertir los checkbox a un valor numérico. Con lo cual sabes lo que esta marcado y lo que no mediante juegos binarios. Te puede ser de mucha utilidad.</p>
<p>Esto lo puedes encontrar en <a href="http://lineadecodigo.com/javascript/checkbox-y-operadores-dinamicos/" rel="nofollow">http://lineadecodigo.com/javascript/checkbox-y-operadores-dinamicos/</a>
</p></description>
		</item>
		<item>
			<title>MostWanted on "abrir word desde borlan c++"</title>
			<link>http://www.dudasprogramacion.com/topic/abrir-word-desde-borlan-c#post-998</link>
			<pubDate>Fri, 25 Nov 2011 16:40:30 +0000</pubDate>
			<dc:creator>MostWanted</dc:creator>
			<guid isPermaLink="false">998@http://www.dudasprogramacion.com/</guid>
			<description><p>El problema puede ser que faltó el start (system("start winword");)</p>
<p>#include&#60;stdlib.h&#62;<br />
int main(){<br />
system("start winword");<br />
return 0;<br />
} </p>
<p> Puedes utilizar esta función system() para abrir cualquier proceso enviándole el codigo que necesitaría para abrirlo el simbolo del sistema.
</p></description>
		</item>
		<item>
			<title>MostWanted on "validacion de datos (alfa-numerico) c++"</title>
			<link>http://www.dudasprogramacion.com/topic/validacion-de-datos-alfa-numerico-c#post-997</link>
			<pubDate>Fri, 25 Nov 2011 16:33:03 +0000</pubDate>
			<dc:creator>MostWanted</dc:creator>
			<guid isPermaLink="false">997@http://www.dudasprogramacion.com/</guid>
			<description><p>Puedes utilizar las funciones de la biblioteca ctype que te permiten el manejo caracteres.<br />
 Si estás trabajando con programación visual y los datos los introducirán en campos de texto, los datos que serán manejados son de tipo AnsiString, pero en el evento onKeyPress se recibe el dato momentáneamente como char hasta que se concatena en el edit.<br />
 Así, puedes codificar, por ejemplo, en Edit1::onKeyPress(...)<br />
if(isalpha(Key))<br />
valida que la tecla introducida sea solo una letra alfabética.<br />
if(isdidit(Key))<br />
Sólo para números.<br />
Incluso hay funciones para para validarlos ambos a la vez, para números hexadecimales, y centenares de funciones que te pueden servir para lo que nesecites.<br />
 Recuerda incluir la librería "ctype"
</p></description>
		</item>
		<item>
			<title>MostWanted on "Contar Checkbox"</title>
			<link>http://www.dudasprogramacion.com/topic/contar-checkbox-1#post-996</link>
			<pubDate>Thu, 24 Nov 2011 19:13:26 +0000</pubDate>
			<dc:creator>MostWanted</dc:creator>
			<guid isPermaLink="false">996@http://www.dudasprogramacion.com/</guid>
			<description><p>Bien, aclararé mejor los pormenores. Estoy trabajando con php y HTML  para hacer gestión de base de datos. Nesecitaré crear de forma dinámica una lista según la cantidad insertada en la base de datos, cada una identificada por el value de un checkbox cuyo nombre será un entero que se incrementa desde uno hasta la cantidad máxima (desconocida) en el registro. Al ser una lista tan grande, la función que será llamada al enviar los datos a la base de datos estará muy cargada con las validaciones para los campos. Por esta razón no quiero crear un arreglo con todos los checkbox a la hora del submit porque la iteración sería enorme y esta web será puesta en una red de configuración lenta. Por eso nesecito contar, con una función js, al mismo momento que se van seleccionando los checkbox, la cantidad que se seleccionan, para no tener que iterar en todo el registro ni en el envío a hacia la bd. Por ejemplo, incrementar una variable en el momento de la selección y decrementarla en caso de desseleccion.<br />
 Estaré muy agradecido con cualquier idea.
</p></description>
		</item>
		<item>
			<title>MostWanted on "Contar Checkbox"</title>
			<link>http://www.dudasprogramacion.com/topic/contar-checkbox-1#post-994</link>
			<pubDate>Wed, 23 Nov 2011 20:27:49 +0000</pubDate>
			<dc:creator>MostWanted</dc:creator>
			<guid isPermaLink="false">994@http://www.dudasprogramacion.com/</guid>
			<description><p>Me gustaría saber como contar los checkbox seleccionados, con una cantidad no fija, cuyos nombres son un numero entero que se incrementa. Estos checkbox se crean dinámicamente, por lo que no se conoce su cantidad. Alguien que me haga el favor de publicarlo algo al respecto.</p>
<p> Nota:: Puedo contar con php la cantidad de chekbox que se van creando.
</p></description>
		</item>
		<item>
			<title>johk0563 on "control de  fechas"</title>
			<link>http://www.dudasprogramacion.com/topic/control-de-fechas#post-993</link>
			<pubDate>Sat, 19 Nov 2011 17:04:57 +0000</pubDate>
			<dc:creator>johk0563</dc:creator>
			<guid isPermaLink="false">993@http://www.dudasprogramacion.com/</guid>
			<description><p>ola, es mi primera bes en esto de programar, lo hago como hobby,y deseo crear un escrip con el cual ingrese una fecha, esta se compre con la del sistema y a su ves calcule la diferencias de , días , meces, años, y me de un resultado xx, para ser mas exacto ,<br />
ejemplo:<br />
cuadro de ingreso de fecha.xx/xx/xx</p>
<p>fecha actual del sistema.xx/xx/xx</p>
<p>calculo de tiempo. ingreso (-) sistema = xx.</p>
<p>si xx es menor que xx1 resulta (no) o falso<br />
si xx es mayor que xx1 resulta (si) o correcto<br />
si es falso no ejecuta rr, si es correcto ejecute se<br />
es para crear un control de personas por medio de su fecha de ingreso, por antigüedad,de esta forma evito ver a quien permitir y a quien no,<br />
agradezco me digan algo sencillo para comenzar a probar,<br />
siempre relacionado con esta idea, parte del programa tengo idea como hacerlo, pero la comprobación de fechas de sistema para no se como se hace<br />
desde ya mil gracias......<br />
johk0563
</p></description>
		</item>
		<item>
			<title>webdamage on "time clock Keico fingerpass mod fpc-301"</title>
			<link>http://www.dudasprogramacion.com/topic/time-clock-keico-fingerpass-mod-fpc-301#post-992</link>
			<pubDate>Tue, 15 Nov 2011 13:13:57 +0000</pubDate>
			<dc:creator>webdamage</dc:creator>
			<guid isPermaLink="false">992@http://www.dudasprogramacion.com/</guid>
			<description><p>hello<br />
I have a problem with a biometric time clock<br />
Keico brand fingerpass mod fpc-301, I have to develop a java application that communicates with the clock by a com-server and I have the SDK for biometric clock model,<br />
if someone can help me thanks<br />
all suggestions are coming<br />
from already thank you very much
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "Creacion de aplicacion en java"</title>
			<link>http://www.dudasprogramacion.com/topic/creacion-de-aplicacion-en-java#post-988</link>
			<pubDate>Mon, 07 Nov 2011 15:29:49 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">988@http://www.dudasprogramacion.com/</guid>
			<description><p>@pequis23,</p>
<p>Buenas, te adjunto un par de ejemplos para ordenar Vectores que espero te sirvan.</p>
<p><a href="http://lineadecodigo.com/java/ordenar-un-vector-de-string-en-java/" rel="nofollow">http://lineadecodigo.com/java/ordenar-un-vector-de-string-en-java/</a><br />
<a href="http://lineadecodigo.com/java/ordenar-un-vector-de-forma-alfabetica-con-java/" rel="nofollow">http://lineadecodigo.com/java/ordenar-un-vector-de-forma-alfabetica-con-java/</a>
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "condicionar elementos de un formulario html"</title>
			<link>http://www.dudasprogramacion.com/topic/condicionar-elementos-de-un-formulario-html#post-987</link>
			<pubDate>Mon, 07 Nov 2011 14:45:59 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">987@http://www.dudasprogramacion.com/</guid>
			<description><p>@nelionuser,</p>
<p>Puedes encontrar un ejemplo para mostrar y ocultar elementos con HTML en<br />
<a href="http://lineadecodigo.com/css/ocultar-imagenes-con-css/" rel="nofollow">http://lineadecodigo.com/css/ocultar-imagenes-con-css/</a></p>
<p>(Aunque es con una imagen, solo tienes que cambiarlo por el formulario).</p>
<p>Si quieres apoyarte en jQuery puedes hacerlo de la siguiente manera:<br />
<a href="http://lineadecodigo.com/jquery/ocultar-y-mostrar-elementos-con-jquery/" rel="nofollow">http://lineadecodigo.com/jquery/ocultar-y-mostrar-elementos-con-jquery/</a></p>
<p>Espero que te sirva de ayuda.
</p></description>
		</item>
		<item>
			<title>nelionuser on "condicionar elementos de un formulario html"</title>
			<link>http://www.dudasprogramacion.com/topic/condicionar-elementos-de-un-formulario-html#post-985</link>
			<pubDate>Thu, 03 Nov 2011 07:32:19 +0000</pubDate>
			<dc:creator>nelionuser</dc:creator>
			<guid isPermaLink="false">985@http://www.dudasprogramacion.com/</guid>
			<description><p>Funciona con un href ??? osea con un link que al darle clic lo muestre u oculte ciertos elementos de un formulario html????
</p></description>
		</item>
		<item>
			<title>skan on "Menús desplegables. Guardar posición?"</title>
			<link>http://www.dudasprogramacion.com/topic/menus-desplegables-guardar-posicion#post-984</link>
			<pubDate>Fri, 28 Oct 2011 00:32:53 +0000</pubDate>
			<dc:creator>skan</dc:creator>
			<guid isPermaLink="false">984@http://www.dudasprogramacion.com/</guid>
			<description><p>Imaginad que hago una lista expandible<br />
Ya sea con &#60;div data-role="collapsible-set"&#62;<br />
o con &#60;ul data-role="listview"&#62; y listas anidadas</p>
<p>Y acabamos seleccionando algún elemento que tiene un link a otra página.<br />
Una página simple con una foto a pantalla completa y un botón para volver atrás.</p>
<p>¿Cómo hago para que al volver atrás se encuentre el menú desplegado exactamente del mismo modo?
</p></description>
		</item>
		<item>
			<title>jorge87 on "duda patron estrategia"</title>
			<link>http://www.dudasprogramacion.com/topic/duda-patron-estrategia#post-983</link>
			<pubDate>Thu, 27 Oct 2011 09:45:11 +0000</pubDate>
			<dc:creator>jorge87</dc:creator>
			<guid isPermaLink="false">983@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola a todos , estoy haciendo una tienda virtual de muebles que clasifica los muebles en clasico y moderno, con la posibilidad de añadir nuevos tipos.Dependiendo del tipo de mueble la tienda hace un descuento .</p>
<p>La interfaz grafica de  Alta Mueble :<br />
codMueble<br />
precio<br />
TipoDescuento<br />
.....<br />
Para resolver esto he utilizado el patron estrategia:</p>
<p>public class Mueble{<br />
private String codMeble;<br />
private double precio;<br />
private IDescuento descuento</p>
<p>public getPrecio(){<br />
return precio;<br />
public IDescuento getIDescuento(){<br />
return descuento;<br />
public double getPrecioConDescuento(){<br />
return getIdescuento*getPrecio();<br />
}}</p>
<p>public interface  IDescuento{<br />
private double factor;<br />
public double getPrecioConDescuento(double precio ){<br />
factor*precio;<br />
}<br />
}<br />
public Clasico implements Idescuento {<br />
private double factor=0.80<br />
public double getPrecioConDescuento(double precio ){<br />
factor*precio;<br />
}<br />
public Moderno implements Idescuento {<br />
private double factor=0.90<br />
public double getPrecioConDescuento(double precio ){<br />
factor*precio;<br />
}<br />
Ahora como lo paso a esto a modelo fisico de datos , es decir como lo paso a tablas para hacer esto se guarde en la base de datos </p>
<p>Yo tendria una tabla Mueble con<br />
codMueble int (10), precio double , ??</p>
<p>Espero que me ayudeis a avanzar . Un saludo
</p></description>
		</item>
		<item>
			<title>gormhonk on "eliminar iframe o modificar iframe con jquery"</title>
			<link>http://www.dudasprogramacion.com/topic/eliminar-iframe-o-modificar-iframe-con-jquery#post-982</link>
			<pubDate>Tue, 25 Oct 2011 11:13:08 +0000</pubDate>
			<dc:creator>gormhonk</dc:creator>
			<guid isPermaLink="false">982@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola,<br />
Mi duda es la siguiente:<br />
Me creo un iframe en un .js de la siguiente manera:<br />
       $('#vista').html('&#60;iframe src="http://aqui pongo la url"/&#62;');<br />
       Desde aqui se hace una llamada a un documento .htm</p>
<p>En el documento htm hago un embed de un flash que quiero visualizar:<br />
      var body = document.getElementById('body');<br />
      body.innerHTML =  '&#60;embed id="previewComp" y aqui monto el componente flash.</p>
<p>Pues aqui viene la cuestion. La primera vez me visualiza el flash correctamente, pero el problema me viene la segunda vez que lo quiero visualizar que me da un error. Me gustaria saber si ¿se puede eliminar un iframe que tiene dentro un embed con un flash?¿Y como se haria? He intentado hacerlo con remove,con empty, pero no lo consigo.</p>
<p>Si me podeis ayudar os lo agradezco muchisimo, estoy totalmente bloqueada y no soy capaz de conseguirlo.</p>
<p>Muchas gracias
</p></description>
		</item>
		<item>
			<title>pequis23 on "Creacion de aplicacion en java"</title>
			<link>http://www.dudasprogramacion.com/topic/creacion-de-aplicacion-en-java#post-981</link>
			<pubDate>Mon, 24 Oct 2011 21:35:16 +0000</pubDate>
			<dc:creator>pequis23</dc:creator>
			<guid isPermaLink="false">981@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola, buenas tardes tengo una duda sobre la creacion de una aplicacion en java dada la siguiente matriz para ordenar las filas en funcion de los apellidos, agradeceria mucho su ayuda sobre este tema,..<br />
0758963214	Jose	Burneo<br />
1785479632	Maria	Abad<br />
1754821647	Juan	Rivas<br />
1106987951	Diego	Castillo</p>
<p>Es decir debo ejecutar el algoritmo de ordenamiento de la matriz y debería quedar asi,..</p>
<p>1785479632	Maria	Abad<br />
0758963214	Jose	Burneo<br />
1106987951	Diego	Castillo<br />
1754821647	Juan	Rivas
</p></description>
		</item>
		<item>
			<title>mmlegazpi on "Creacion osciloscopio virtual"</title>
			<link>http://www.dudasprogramacion.com/topic/creacion-osciloscopio-virtual#post-980</link>
			<pubDate>Mon, 24 Oct 2011 11:45:11 +0000</pubDate>
			<dc:creator>mmlegazpi</dc:creator>
			<guid isPermaLink="false">980@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenos dias, </p>
<p>¿Queria saber que lenguaje de programación recomendariais para crear un osciloscopio virtual, o un banco de pruebas?</p>
<p>Mi primera intuición es hacerlo con LabView ya que es el que aprendí en la carrera y la programación gráfica es muy facil y bastante divertida y tiene ya todas las librerias hechas para conectarse a puertos, extraer datos de hojas de calculo, etc...</p>
<p>El problema es que los gráficos del panel de usuario son bastante cutres y no quedan muy bien.</p>
<p>Habia pensado en JAVA.... </p>
<p>¿Alguna sugerencia?
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "¿Como integrar un plugin jquery a woordpress?"</title>
			<link>http://www.dudasprogramacion.com/topic/%c2%bfcomo-integrar-un-plugin-jquery-a-woordpress#post-979</link>
			<pubDate>Fri, 21 Oct 2011 11:52:43 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">979@http://www.dudasprogramacion.com/</guid>
			<description><p>@erix_on,</p>
<p>Se me ocurre que puedes tocar el Theme e importar el fichero jQuery. Y luego hacerte un template para aplicarlo a una página con el Slider.
</p></description>
		</item>
		<item>
			<title>erix_on on "¿Como integrar un plugin jquery a woordpress?"</title>
			<link>http://www.dudasprogramacion.com/topic/%c2%bfcomo-integrar-un-plugin-jquery-a-woordpress#post-978</link>
			<pubDate>Sun, 16 Oct 2011 01:13:18 +0000</pubDate>
			<dc:creator>erix_on</dc:creator>
			<guid isPermaLink="false">978@http://www.dudasprogramacion.com/</guid>
			<description><p>pues precisamente lo que no quiero son esos sliders, pues a mi me gustaria adaptar de alguna forma este plugin a una pagina de wordpress, realmente no quiero hacerle todo un administrador de este plugin para wordpress, sino solo quisiera saber si de alguna forma solo se pudiera integrar este slider a una sola pagina de woordpress.
</p></description>
		</item>
		<item>
			<title>lineadecodigo on "¿Como integrar un plugin jquery a woordpress?"</title>
			<link>http://www.dudasprogramacion.com/topic/%c2%bfcomo-integrar-un-plugin-jquery-a-woordpress#post-977</link>
			<pubDate>Sun, 09 Oct 2011 16:10:50 +0000</pubDate>
			<dc:creator>lineadecodigo</dc:creator>
			<guid isPermaLink="false">977@http://www.dudasprogramacion.com/</guid>
			<description><p>@erix_on,</p>
<p>Integrar el plugin de jQuery como extensión de Wordpress tiene su trabajo.<br />
Mi recomendación es que utilices alguno de los sliders que trae Wordpress.<br />
Si buscas "image slider" en la parte de plugins, te salen un montón.
</p></description>
		</item>

	</channel>
</rss>

