¿Como hacer tabla en javascript, separando estructura de datos por un lado y utilizando una función para pintar dicha estructura?

function pintar_tabla(){ var col=document.getElementById(“columna”).value; var filas=document.getElementById(“fila”).value; var tabla = “”; tabla += “”; for (j = 0; j ” + (j + 1) + “”; } tabla += “”; for (i = 0; i “; tabla += “” + (i + 1) + “”; for (j = 0; j ” + “” + “”; } tabla += “”; } tabla += “”; document.getElementById(“resultado”).innerHTML = tabla; }

Ciclo for javascript para crear una pirámide de números

bien lo que trato de hacer es que imprima los numeros dependiendo el valor de “j” por ejemplo si pongo 4 tendria que hacer

1 12 123 1234 

y ya lo hace solo el detalle es que no los imprime como en el ejemplo si no que todo lo hace hacia abajo, ayuda por favor.

<html> <body> <script type="text/javascript"> var i=1 var n=0 var j=4 for(n; n<=j;n++){ for (i=1;i<=n;i++){  document.write(i )  document.write("<br />") } } </script> </body> </html> 

¿Como hago para ingresar un arreglo de 7 elementos y que me lo ordene por el metodo de intercambio?

Eh logrado hacer esto:cuando ingreso 7 numeros del 1 al 7 me anda pero cuando ingreso numeros mas grande no me funciona.. por que? aca les dejo el codigo que eh hecho hasta el momento.. agradeceria su ayuda.. la duda que tengo es en que parte del codigo deberia pedirle al usuario que ingrese los numeros y en que variables deberia guardarlo? Y tambien en como haria para imprimir esos numeros que el usuario me ingrese hay es donde estoy perdido en la parte donde tengo que pedir que me ingrese los numeros

#include <iostream>   void intercambiar(int& x, int& y) {  int aux = x; x = y; y = aux;   }   //Ordenamiento por Intercambio Ascendente  void ordIntercambio(int a[], int n) {    int i, j;      for (i = 0; i < n - 1; i++) {      for (j = i + 1; j < n; j++) {               if (a[i] < a[j]) {          intercambiar(a[i], a[j]);         }     } }  }   void imprimirArreglo(int a[], int tam) {  std::cout << "[";  for(int i = 0; i < tam; i++) {  std::cout << a[i] << ","; }  std::cout << "]" << std::endl; }   void copiar_arreglo(int origen[], int destino[], int tam){  for(int i = 0; i < tam; i++) {  destino[i] = origen[i];  } }    int main() {  int tamArreglo = 6;  int arregloOrg[6];  int arregloTemporal[6];  for(int i=0; i<7;i++){  std::cout<<"Ingrese un numero: ";  std:: cin >>arregloOrg[i];  }  std::cout << "Arreglo a ordenar: " << std::endl;  imprimirArreglo (arregloOrg, tamArreglo);  std::cout << std::endl;  //copio el arreglo para tener una version del original...  copiar_arreglo(arregloOrg, arregloTemporal, tamArreglo);  ordIntercambio(arregloTemporal, tamArreglo);  std::cout << "Ordenamiento por Intercambio Ascendente: " << std::endl;  imprimirArreglo(arregloTemporal, tamArreglo);  std::cout << std::endl;  return 0; } 

Flutter me está dando un error y necesito ayuda para resolverlo

enderBox was not laid out: RenderDecoratedBox#6993a relayoutBoundary=up1 ‘package:flutter/src/rendering/box.dart’: Failed assertion: line 1681 pos 12: ‘hasSize’ User-created ancestor of the error-causing widget was: Container file:///C:/Users/XmGpo/AndroidStudioProjects/proyecto_tienda/lib/componentes/productos.dart:93:27 ════════════════════════════════════════════════════════════════════════════════════════════════════ E/flutter (20017): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Cannot hit test a render box with no size. E/flutter (20017): The hitTest() method was called on this RenderBox: RenderDecoratedBox#6993a relayoutBoundary=up1: E/flutter (20017): creator: DecoratedBox ← Container ← Positioned ← Stack ← GridTile ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ← GestureDetector ← MouseRegion ← InkWell ← ⋯ E/flutter (20017): parentData: right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size) E/flutter (20017): constraints: BoxConstraints(w=172.0, 0.0<=h<=Infinity) E/flutter (20017): size: MISSING E/flutter (20017): decoration: BoxDecoration: E/flutter (20017): color: Color(0xb3ffffff) E/flutter (20017): configuration: ImageConfiguration(bundle: PlatformAssetBundle#6855e(), devicePixelRatio: 4.0, locale: en_US, textDirection: TextDirection.ltr, platform: android) E/flutter (20017): Although this node is not marked as needing layout, its size is not set. E/flutter (20017): A RenderBox object must have an explicit size before it can be hit-tested. Make sure that the RenderBox in question sets its size during layout. E/flutter (20017): #0 RenderBox.hitTest. (package:flutter/src/rendering/box.dart:2111:9) E/flutter (20017): #1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2126:6) E/flutter (20017): #2 RenderBoxContainerDefaultsMixin.defaultHitTestChildren. (package:flutter/src/rendering/box.dart:2481:24) E/flutter (20017): #3 BoxHitTestResult.addWithRawTransform (package:flutter/src/rendering/box.dart:795:31) E/flutter (20017): #4 BoxHitTestResult.addWithPaintOffset (package:flutter/src/rendering/box.dart:752:12) E/flutter (20017): #5 RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2476:33) E/flutter (20017): #6 RenderStack.hitTestChildren (package:flutter/src/rendering/stack.dart:585:12) E/flutter (20017): #7 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #8 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #9 RenderProxyBoxWithHitTestBehavior.hitTest (package:flutter/src/rendering/proxy_box.dart:161:19) E/flutter (20017): #10 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #11 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #12 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #13 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #14 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #15 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #16 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #17 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #18 RenderPhysicalModel.hitTest (package:flutter/src/rendering/proxy_box.dart:1716:18) E/flutter (20017): #19 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #20 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #21 RenderOffstage.hitTest (package:flutter/src/rendering/proxy_box.dart:3146:31) E/flutter (20017): #22 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #23 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #24 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #25 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #26 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #27 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #28 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #29 RenderCustomPaint.hitTestChildren (package:flutter/src/rendering/custom_paint.dart:508:18) E/flutter (20017): #30 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #31 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #32 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #33 RenderPhysicalShape.hitTest (package:flutter/src/rendering/proxy_bo E/flutter (20017): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Cannot hit test a render box with no size. E/flutter (20017): The hitTest() method was called on this RenderBox: RenderDecoratedBox#6993a relayoutBoundary=up1: E/flutter (20017): creator: DecoratedBox ← Container ← Positioned ← Stack ← GridTile ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ← GestureDetector ← MouseRegion ← InkWell ← ⋯ E/flutter (20017): parentData: right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size) E/flutter (20017): constraints: BoxConstraints(w=172.0, 0.0<=h<=Infinity) E/flutter (20017): size: MISSING E/flutter (20017): decoration: BoxDecoration: E/flutter (20017): color: Color(0xb3ffffff) E/flutter (20017): configuration: ImageConfiguration(bundle: PlatformAssetBundle#6855e(), devicePixelRatio: 4.0, locale: en_US, textDirection: TextDirection.ltr, platform: android) E/flutter (20017): Although this node is not marked as needing layout, its size is not set. E/flutter (20017): A RenderBox object must have an explicit size before it can be hit-tested. Make sure that the RenderBox in question sets its size during layout. E/flutter (20017): #0 RenderBox.hitTest. (package:flutter/src/rendering/box.dart:2111:9) E/flutter (20017): #1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2126:6) E/flutter (20017): #2 RenderBoxContainerDefaultsMixin.defaultHitTestChildren. (package:flutter/src/rendering/box.dart:2481:24) E/flutter (20017): #3 BoxHitTestResult.addWithRawTransform (package:flutter/src/rendering/box.dart:795:31) E/flutter (20017): #4 BoxHitTestResult.addWithPaintOffset (package:flutter/src/rendering/box.dart:752:12) E/flutter (20017): #5 RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2476:33) E/flutter (20017): #6 RenderStack.hitTestChildren (package:flutter/src/rendering/stack.dart:585:12) E/flutter (20017): #7 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #8 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #9 RenderProxyBoxWithHitTestBehavior.hitTest (package:flutter/src/rendering/proxy_box.dart:161:19) E/flutter (20017): #10 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #11 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #12 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #13 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #14 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #15 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #16 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #17 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #18 RenderPhysicalModel.hitTest (package:flutter/src/rendering/proxy_box.dart:1716:18) E/flutter (20017): #19 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #20 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #21 RenderOffstage.hitTest (package:flutter/src/rendering/proxy_box.dart:3146:31) E/flutter (20017): #22 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #23 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #24 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #25 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #26 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #27 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #28 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #29 RenderCustomPaint.hitTestChildren (package:flutter/src/rendering/custom_paint.dart:508:18) E/flutter (20017): #30 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #31 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #32 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #33 RenderPhysicalShape.hitTest (package:flutter/src/rendering/proxy_bo E/flutter (20017): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Cannot hit test a render box with no size. E/flutter (20017): The hitTest() method was called on this RenderBox: RenderDecoratedBox#6993a relayoutBoundary=up1: E/flutter (20017): creator: DecoratedBox ← Container ← Positioned ← Stack ← GridTile ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ← GestureDetector ← MouseRegion ← InkWell ← ⋯ E/flutter (20017): parentData: right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size) E/flutter (20017): constraints: BoxConstraints(w=172.0, 0.0<=h<=Infinity) E/flutter (20017): size: MISSING E/flutter (20017): decoration: BoxDecoration: E/flutter (20017): color: Color(0xb3ffffff) E/flutter (20017): configuration: ImageConfiguration(bundle: PlatformAssetBundle#6855e(), devicePixelRatio: 4.0, locale: en_US, textDirection: TextDirection.ltr, platform: android) E/flutter (20017): Although this node is not marked as needing layout, its size is not set. E/flutter (20017): A RenderBox object must have an explicit size before it can be hit-tested. Make sure that the RenderBox in question sets its size during layout. E/flutter (20017): #0 RenderBox.hitTest. (package:flutter/src/rendering/box.dart:2111:9) E/flutter (20017): #1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2126:6) E/flutter (20017): #2 RenderBoxContainerDefaultsMixin.defaultHitTestChildren. (package:flutter/src/rendering/box.dart:2481:24) E/flutter (20017): #3 BoxHitTestResult.addWithRawTransform (package:flutter/src/rendering/box.dart:795:31) E/flutter (20017): #4 BoxHitTestResult.addWithPaintOffset (package:flutter/src/rendering/box.dart:752:12) E/flutter (20017): #5 RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2476:33) E/flutter (20017): #6 RenderStack.hitTestChildren (package:flutter/src/rendering/stack.dart:585:12) E/flutter (20017): #7 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #8 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #9 RenderProxyBoxWithHitTestBehavior.hitTest (package:flutter/src/rendering/proxy_box.dart:161:19) E/flutter (20017): #10 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #11 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #12 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #13 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #14 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #15 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #16 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #17 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #18 RenderPhysicalModel.hitTest (package:flutter/src/rendering/proxy_box.dart:1716:18) E/flutter (20017): #19 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #20 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #21 RenderOffstage.hitTest (package:flutter/src/rendering/proxy_box.dart:3146:31) E/flutter (20017): #22 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #23 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #24 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #25 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #26 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #27 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #28 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #29 RenderCustomPaint.hitTestChildren (package:flutter/src/rendering/custom_paint.dart:508:18) E/flutter (20017): #30 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #31 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:114:19) E/flutter (20017): #32 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2128:11) E/flutter (20017): #33 RenderPhysicalShape.hitTest (package:flutter/src/rendering/proxy_bo

Tablas para cuentas corrientes de clientes y proveedores en mysql

Tengo una tabla de clientes(idCliente, nombre, etc.), una de proveedores(idProveedor, nombre, etc.); una tabla de factura_ventas(idFacturaV,fecha,idCleinte_fk, etc.) vinculada a los clientes y una tabla de factura_compras(idFacturaC, fecha, idProveedor_fk, etc.) vinculada a los proveedores. Con estas tablas yo registro lo que le vendemos a los clientes y los que le compramos a los proveedores.

Pero, tambien necesito registrar ventas y compras al credito para clientes y proveedores, digamos que necesito registrar el movimiento de dichos créditos pero no se me ocurre como. Lo que he hecho es una tabla de creditosCliente para clientes y una tabla de creditosproveedor para proveedores y en otra tabla movimientoCredritoCLientes registro el importe del credito que se supone se va a recibir del cliente cuando realice sus pagos y de la misma manera tengo otra tabla movimientoCreditoProveedores con las mismas caracteristias que la anterior, lo unico que cambia en estas dos ultimas tablas es el id_cliente e id_proveedor. lo mismo pasa con las tablas creditoCliente y creditosProveedor, solo los diferencia el idCliente e idProveedor porque los demas campos de las mismas son iguales.

pero no se si esa sea la mejor manera de hacerla porque veo que se repiten esas tablas.

Mi pregunta es: ¿Habrá alguna manera de crear una sola tabla para los movimientos de creditos tanto para clientes y para proveedores?? o alguna idea diferente de estructurar las tablas. Gracias de antemano.

Show image after X para – center aligned

I am using this code in wordpress functions.php to display featured image after 1st para.

The problem is: Image is showing left-aligned. I want it to be center aligned..

Please modify this code so I can display the image in the centre of post?

add_filter( 'the_content', 'insert_featured_image', 20 );  function insert_featured_image( $  content ) {      $  content = preg_replace( "/<\/p>/", "</p>" . get_the_post_thumbnail($  post->ID, 'post-single'), $  content, 1 );      return $  content; } 

Capturar el id de una o varias celdas de un DataGridView para SMS Masivos

Añadí un CheckBox al DataGridView para poder seleccionar varios items y así pasarlos a un Array para poder enviar mensajes de manera masiva.

Problema 1: presionar sobre el CheckBox no se tilda. Cabe mencionar que lo único que hice fue agregarlo desde las propiedades de edición del DataGridView.

Problema 2: para enviar mensajes de manera masiva se utiliza el siguiente bloque en string:

string bloque = ""; bloque = bloque + "ID1\t112223333\tMensaje\n"; 

Pero, yo necesito enviar esos mensajes de manera automática. Es decir que, a excepción del mensaje o texto, el ID y el TELÉFONO se deben cargar y/o asignar seleccionando uno o varios CheckBoxes del DataGridView. Para esto, cree la siguiente clase:

class Datos     {         public int id { get; set; }         public string celular { get; set; }         public string texto{ get; set; }          public Datos() { }         public Datos(int id, string cel, string texto) {             this.id = id;             this.celular = cel;             this.texto= texto;         }          public string toString() {             return "ID"+id+"\t" + celular + "\t" + texto + "\n";         }     } }//el objetivo será utilizarla para cargar un array luego 

Ahora, este es actualmente el código de la interfaz:

public partial class Form1 : Form{         public Form1(){             InitializeComponent();             dtgId.AllowUserToAddRows = false;         }         private void Form1_Load(object sender, EventArgs e){             llenarId();             dtgId.ReadOnly = true;         }          public void llenarId(){//método para poblar el DataGridView             try{                 string cadena = "cadena";                 using (SqlConnection con = new SqlConnection(cadena)){                     con.Open();                     string query = "SELECT id FROM clientes GROUP BY id";                     SqlCommand cmd = new SqlCommand(query, con);                     SqlDataAdapter da = new SqlDataAdapter(cmd);                     DataSet ds = new DataSet();                     da.Fill(ds);                     dtgId.DataSource = ds.Tables[0];                     con.Close();                 }             }             catch (SqlException ex){                 MessageBox.Show("Error: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);             }         }          private void button2_Click(object sender, EventArgs e){//Código para enviar SMS de manera masiva             string usuario = "usuario";             string clave = "clave";             string respuesta = "";             int id = Convert.ToInt32(txtId.Text);             string telefono = txtNumero.Text;             string texto = txtTexto.Text;             List<Datos> item = new List<Datos>();             Datos datos = new Datos(id, telefono, texto);             item.Add(datos);             string bloque = "";             //bloque = bloque + "ID1\t1144444444\tMi texto 1\n";             for (int i = 0; i > item.Count; i++){                 bloque += item[i].toString();             }              Uri uri = new Uri("uri");              HttpWebRequest requestFile = (HttpWebRequest)WebRequest.Create(uri);             requestFile.Method = "POST";             requestFile.ContentType = "application/x-www-form-urlencoded";             StringBuilder postData = new StringBuilder();             postData.Append("api=" + System.Web.HttpUtility.UrlEncode("1") + "&");             postData.Append("usuario=" + System.Web.HttpUtility.UrlEncode(usuario) + "&");             postData.Append("clave=" + System.Web.HttpUtility.UrlEncode(clave) + "&");             postData.Append("separadorcampos=" + System.Web.HttpUtility.UrlEncode("tab") + "&");             postData.Append("bloque=" + System.Web.HttpUtility.UrlEncode(bloque) + "&");              byte[] byteArray = Encoding.GetEncoding("iso-8859-1").GetBytes(postData.ToString());              requestFile.ContentLength = byteArray.Length;              Stream requestStream = requestFile.GetRequestStream();             requestStream.Write(byteArray, 0, byteArray.Length);             requestStream.Close();              HttpWebResponse webResp = requestFile.GetResponse() as HttpWebResponse;              if (requestFile.HaveResponse){                 if (webResp.StatusCode == HttpStatusCode.OK || webResp.StatusCode == HttpStatusCode.Accepted){                     StreamReader respReader = new StreamReader(webResp.GetResponseStream(), Encoding.GetEncoding("iso-8859-1"));                     respuesta = respReader.ReadToEnd();                     MessageBox.Show(respuesta);                 }             }         }          private void dtgId_CellContentClick(object sender, DataGridViewCellEventArgs e){ //con este método al presionar sobre un checkbox se muestra el id y el teléfono en un TextBox             var row = dtgId.Rows[e.RowIndex];             var id = Convert.ToInt32(row.Cells["id"].Value.ToString());             try{                 string conn = "cadena";                 using (SqlConnection con = new SqlConnection(conn)){                     con.Open();                     string sql = "SELECT id,celular FROM clientes WHERE id=@id";                     SqlCommand cmd = new SqlCommand(sql, con);                     cmd.Parameters.AddWithValue("@id", id);                     SqlDataReader reader = cmd.ExecuteReader();                     if (reader.Read()){                         txtId.Text = reader["id"].ToString();                         txtNumero.Text = reader["celular"].ToString();                     }                 }             }catch (SqlException exc){                 MessageBox.Show("Error: " + exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);             }         }     } } 

Para resumir la idea: No envía los mensajes, es decir no me han llegado. ¿Alguna idea de cómo puedo solucionarlo?

Script para Ordenar Datos

Soy programador pero me especializo en PHP. Tengo una serie de links que llevan a unas fotos de un contenido que debo llevar a una página. Esos Links estan identificados con un código por ejemplo:

https://example.com/18-57475.jpg 

Debo emparejar esos links con su contenido correspondiente en una Hoja Excel. O sea, en la Hoja Excel estan esos códigos que señale arriba, pero necesito un script que identifique ese codigo en la Hoja Excel y luego mueva el link de con su respectivo código.

Si no me entienden puedo dar explicaciones mas claras.

¿Como hago para que no me salga los mismos datos con una ID diferente?

buena lo que pasa es que estoy haciendo un formulario C# con PostGreSQL usando ArrayList, pero quiero que me busque los datos con una ID respectiva, sin contar con el “mismo dato”. Aca le dejo el código desde la clase ‘Personas’.

public ArrayList buscar(string rut)     {          String ru, noms, apa, ama, fnac;         if (rut == "")         {             MessageBox.Show("Parametros incorrectos o vacíos");         }          conectar();          try         {                 //String llam = "select * from personas where rut='" + rut + "'";                 NpgsqlCommand command = new NpgsqlCommand("select * from personas where rut='" + rut + "'", conn);                  NpgsqlDataReader dr = command.ExecuteReader();                  while (dr.Read())                 {                     ru = dr[0].ToString();                     noms = dr[1].ToString();                     apa = dr[2].ToString();                     ama = dr[3].ToString();                     fnac = dr[4].ToString();                     list.Add(ru);                     list.Add(noms);                     list.Add(apa);                     list.Add(ama);                     list.Add(fnac);                  }                 dr.Close();                 cerrar();                 command.Dispose();             }             catch             {                 MessageBox.Show("Problemas al reconocer datos", "Error");                 cerrar();             }              //Console.Write(rut.Trim() + " " + nombre_s.Trim() + " " + apellido_s.Trim() + "\n");          return list;     } 

En la clase Form. Esta el motor para el botón buscar que comunica desde la clase. Así para solucionar el problema que me está arrebatando las horas. NOTA: Añadí las primera 2 cadenas en que tornan el contacto con la clase.

    public ArrayList lista = new ArrayList();     personas contact = new personas();      private void Buscar_Click(object sender, EventArgs e)     {         lista = contact.buscar(textBox1.Text);         textBox2.Text = lista[1].ToString();         textBox3.Text = lista[2].ToString();         textBox5.Text = lista[3].ToString();         textdate.Text = lista[4].ToString();     }