|
261
|
Programación / .NET (C#, VB.NET, ASP) / Re: Pregunta tonta ;( mostrar en label
|
en: 20 Noviembre 2014, 07:52 am
|
Wow, eso esta raro, debería salir. ¿Podrías mostrar un poco más de código?, por ejemplo: ¿que es Result2255 y que hace Count?
Pero a simple vista, chequea que Label1, sea de hecho el Name de la Label a la cual le quieres asignar el nombre.
? que es Result2255 y que hace Count ? Result2255 es la variable que contiene los datos y count cuenta esos datos y los cuenta bien ya que lo comprobé manualmente, yo asigno un lebel al formulario y los nombres están correctos pero me muestra la cuenta en cualquier parte del formulario y no dentro del lebel ??? luis
|
|
|
266
|
Programación / .NET (C#, VB.NET, ASP) / Como puedo llamar un txt desde un botón después de gravado ?
|
en: 14 Noviembre 2014, 08:02 am
|
hola tengo esta rutina que me grava un txt y quiero verlo desde otro boton Private Sub GuardarCombinacionesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GuardarCombinacionesToolStripMenuItem.Click Dim rutaFichero As String Dim i As Integer rutaFichero = Path.Combine(Application.StartupPath, "Combinaciones.txt") Dim fichero As New IO.StreamWriter(rutaFichero) For i = 0 To ListBox2.Items.Count - 1 fichero.WriteLine(ListBox2.Items(i)) Next fichero.Close() End Sub
Luis
|
|
|
267
|
Programación / .NET (C#, VB.NET, ASP) / Re: eliminar registros con ceros
|
en: 12 Noviembre 2014, 12:35 pm
|
Tiempo record ,,, ni yo me lo creo FUNCIONA Loop ' skipStart = (constantValues.Count - length) combinations.RemoveAll(Function(list As List(Of Integer)) list.First = 0) combinations.ForEach(Sub(combination As List(Of Integer)) ListBox2.Items.Add(String.Join(", ", From value As Integer In combination Select If(value.ToString.Length = 1I, value.ToString.Insert(0I, "0"c), value.ToString))) End Sub)
Gracias elektro Luis
|
|
|
269
|
Programación / .NET (C#, VB.NET, ASP) / Re: eliminar registros con ceros
|
en: 12 Noviembre 2014, 10:47 am
|
Si pero los doble cero adelante siempre me explico mal ;( 00, 01, 02, 04, 05, 06 <---- eliminar toda la linea que contengan doble cero o cero de primeros los demas tipo 01 05 09 dejarlos 00, 01, 03, 04, 05, 06 =eliminar 00, 01, 04, 05, 06, 08 =eliminar 00, 01, 04, 05, 06, 09 =eliminar 01, 02, 04, 05, 06, 18 =<--dejar 10 ,20 ,45 ,88 .87, 90 <----dejar luis
|
|
|
270
|
Programación / .NET (C#, VB.NET, ASP) / eliminar registros con ceros
|
en: 12 Noviembre 2014, 08:09 am
|
Hola como puedo eliminar los registros que contengan ceros ? 00, 01, 02, 04, 05, 06 00, 01, 03, 04, 05, 06 00, 01, 04, 05, 06, 08 00, 01, 04, 05, 06, 09 00, 01, 04, 05, 06, 18 00, 01, 04, 05, 06, 10 00, 01, 04, 05, 06, 11 00, 01, 04, 05, 06, 15 10 ,20 ,45 ,88 .87, 90 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim combinations As New List(Of List(Of Integer)) Dim length As Integer = 5 Dim skipStart As Integer = 0 Do Until skipStart = (constantValues.Count - length) Dim values As List(Of Integer) = constantValues.GetRange(skipStart, length) Dim count As Integer = 0 Do Until count = (constantValues.Count - length - skipStart) Dim list As List(Of Integer) = values.Concat(constantValues.Skip(skipStart + length + count).Take(1)).ToList list.Sort() combinations.Add(list) ' Debug.WriteLine(String.Join(", ", values.Concat(constantValues.Skip(skipStart + length + count).Take(1)).ToArray)) count += 1 Loop ' count = (constantValues.Count - length) skipStart += 1 Loop ' skipStart = (constantValues.Count - length) combinations.ForEach(Sub(combination As List(Of Integer)) ListBox2.Items.Add(String.Join(", ", From value As Integer In combination Select If(value.ToString.Length = 1I, value.ToString.Insert(0I, "0"c), value.ToString))) End Sub) End Sub
Luis
|
|
|
|
|
|
|