elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: Trabajando con las ramas de git (tercera parte)


  Mostrar Mensajes
Páginas: 1 ... 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 [1006] 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 ... 1254
10051  Programación / .NET (C#, VB.NET, ASP) / Re: ¿Como evitar el efecto Flashing de un listview? en: 31 Diciembre 2012, 13:35 pm
OMG !

Seba, eso es la diferencia entre un verdadero experto, y todas las demás supuestas soluciones que salen en Google.

Mil gracias. ;D

Ya me has demostrado varias veces que se puede salir de apuros parecidos heredando controles, la próxima vez intentaré eso antes de preguntar,
Lo que no llego a comprender es porque el control original no tiene el DoubleBuffered ON, maldito Microsoft, en fin!!.

Un saludo.
10052  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] ¿Como evitar el efecto Flashing de un listview? en: 31 Diciembre 2012, 12:45 pm
Cuando añado un item al listrview, hace un flash, un efecto muy desagradable.

Lo he intentado TODO, AddRange, Suspendlayout, Me.Doublebuffered, y por último BeginUpdate... Nada lo ha resuelto.

Código
  1. for each file....
  2.  
  3.                Problems += 1
  4.                str(0) = Problems
  5.                str(1) = str(1).Substring(2)
  6.                str(2) = File.FullName
  7.                itm = New ListViewItem(str)
  8.                InvokeControl(ListView, Sub(x) x.BeginUpdate())
  9.                InvokeControl(ListView, Sub(x) x.Items.Add(itm))
  10.                InvokeControl(ListView, Sub(x) x.EnsureVisible(ListView.Items.Count - 1))
  11.                InvokeControl(ListView, Sub(x) x.EndUpdate())
  12. end for...
  13.  

Esto es otra variante del código, aquí noto cierta mejora (Flashes más cortos):
Código
  1.   Private Sub AddItemToListView()
  2.        str(0) = Problems
  3.        str(1) = str(1).Substring(2)
  4.        str(2) = File.FullName
  5.        itm = New ListViewItem(str)
  6.        ListView.SuspendLayout()
  7.        InvokeControl(ListView, Sub(x) x.BeginUpdate())
  8.        InvokeControl(ListView, Sub(x) x.Items.Add(itm))
  9.        InvokeControl(ListView, Sub(x) x.EnsureVisible(ListView.Items.Count - 1))
  10.        InvokeControl(ListView, Sub(x) x.EndUpdate())
  11.        ListView.ResumeLayout()
  12.        If NumberIsOdd(Problems) Then
  13.            itm.BackColor = Color.FromArgb(15, 15, 15)
  14.        Else
  15.            itm.BackColor = Color.FromArgb(30, 30, 30)
  16.        End If
  17.    End Sub



Sé que el AddRange y BeginUpdate están pensados para añadir varios items, pero como podeis comprobar en el ejemplo es que yo necesito añadirlos uno por uno.

¿Que puedo hacer?
10053  Programación / Scripting / Re: Concurso de videojuego en Batch en: 30 Diciembre 2012, 16:29 pm
creo que EleKtro una vez hizo un tetris que porcierto, me encanto.
Nunca he hecho un juego así, de movimiento y coordenadas,
Segúramente te refieres a este magnifico juego: [BATCH GAME] ¡Batch Tetris V 1.0!

10054  Programación / Scripting / Re: Concurso de videojuego en Batch en: 30 Diciembre 2012, 09:34 am
Sin ubicar las cosas en pantalla, lo único que se puede hacer es un test de preguntas o un piedra papel tijeras.

Cierto, sin coordenadas ningun batch game se puede comparar a tu Batch-Tetris xD
PD: Deseando verlo compatible en x64 ;)
10055  Programación / Scripting / Re: [Batch] [APORTE] Text Protector en: 29 Diciembre 2012, 13:42 pm
¿Es de codigo libre?
Lee la postdata final del post  :silbar:



Cierro el tema por antiguedad.

10056  Programación / Scripting / Re: Concurso de videojuego en Batch en: 29 Diciembre 2012, 08:36 am
no debera incluir sistema de coordenadas.

Aquí va uno pues xD:

Lo sé, No es gran cosa, Solo lo hice por aburrimiento!

Saludos.



   

Código
  1. @Echo OFF
  2. Title Piedra, Papel, O tijera!  (By Elektro H@cker)
  3. Color 0F
  4. Mode con cols=60 lines=26
  5.  
  6. :Play
  7. CLS
  8. Set WIN=
  9. Echo:              Player      [MARCADOR]      COM
  10. Echo:                %POINTS%                          %COMPOINTS%
  11. Echo: __________________________________________________________
  12. Echo:                                                                            | MORE
  13. Echo:       [1] O              [2] #              [3] 8^^^<                      | MORE
  14. Echo:       Piedra             Papel              Tijera    | MORE | MORE | MORE | MORE
  15.  
  16. Choice /C 123 /M "¨Que llevas en la mano? "
  17.  
  18. Set Player=%ERRORLEVEL%
  19. Set COMPlayer=%RANDOM:~0,1%
  20. If %COMPlayer% GTR 3 (Set /A COMPlayer=3)
  21.  
  22. CLS
  23. IF %PLAYER% EQU 1    (Set PlayerHAND=una piedra)
  24. IF %PLAYER% EQU 2    (Set PlayerHAND=un papel)
  25. IF %PLAYER% EQU 3    (Set PlayerHAND=una tijera)
  26. Echo+ & Echo: Sacaste %PlayerHAND%! | MORE
  27. Call :ANI%PLAYER%
  28.  
  29. IF %COMPLAYER% EQU 1 (Set COMHAND=una piedra)
  30. IF %COMPLAYER% EQU 2 (Set COMHAND=un papel)
  31. IF %COMPLAYER% EQU 3 (Set COMHAND=una tijera)
  32. Echo: La consola sac¢ %COMHAND%! | MORE
  33. Call :ANI%COMPLAYER%
  34.  
  35. IF DEFINED WIN (
  36. IF "%WIN%" EQU "SI" (Echo: GANASTE!  & Set /A Points+=1)
  37. IF "%WIN%" EQU "NO" (Echo: PERDISTE! & Set /A COMPOINTS+=1)
  38. ) ELSE (Echo: EMPATE!)
  39.  
  40. Timeout /T 3 2>NUL || (Pause)
  41. Goto :Play
  42.  
  43.  
  44. :ANI1
  45. Echo:         ________________
  46. Echo:      .='==============;:\
  47. Echo:      ^|                ^|:^|
  48. Echo:      ^|                ^|:^|
  49. Echo:      ^|                ^|;^|
  50. Echo:      ^|                ^|;/
  51. Echo:      '================'` | MORE
  52. If %PLAYER% EQU 2 (Set Win=SI)
  53. If %PLAYER% EQU 3 (Set Win=NO)
  54. Goto :EOF
  55.  
  56. :ANI2
  57. Echo:            _________
  58. Echo:          /-        -/
  59. Echo:         /~~======~~/
  60. Echo:        /          /
  61. Echo:       (          (
  62. Echo:        `==========` | MORE
  63. If %PLAYER% EQU 1 (Set Win=NO)
  64. If %PLAYER% EQU 3 (Set Win=SI)
  65. Goto :EOF
  66.  
  67. :ANI3
  68. Echo:        ___               __
  69. Echo:       / _ \          _.-'_.'
  70. Echo:       \____`-.____.-'_.-'
  71. Echo:            `-. _.\.-'
  72. Echo:        ____.-'`__/-._
  73. Echo:       / _  .-'`  '-._`-._
  74. Echo:       \___/          '-._'-.
  75. Echo:                          `-` | MORE
  76. If %PLAYER% EQU 1 (Set Win=SI)
  77. If %PLAYER% EQU 2 (Set Win=NO)
  78. Goto :EOF
10057  Programación / Scripting / Re: [batch] cifrar codigo batch en: 29 Diciembre 2012, 08:22 am
Cita de: imlikeabird34
PD: no entiendo la logica de estos programas ,si agregan codigo al bat(para no ser detectado por antivirus ) como pueden ser ejecutados despues?

Cita de: EleKtro H@cker
Con un poco de maña puedes hacer que se auto-descifre el código en tiempo de ejecución agregando las variables y sus valores en el bat cifrado.

Ejemplo:

Código
  1. @Echo OFF
  2.  
  3. Set "{=B"
  4. Set "º=C"
  5. Set "/=D"
  6. Set "!=E"
  7. Set "@=H"
  8. Set "?=I"
  9. Set "#=L"
  10. Set "}=M"
  11. Set "$=O"
  12. Set "-=R"
  13.  
  14. %!%%º%%@%%$% Estoy ejecutandome :D | %}%%$%%-%%!% | %}%%$%%-%%!%
  15.  
  16. %!%%º%%@%%$% %/%%?%%-% "%º%:\": | %}%%$%%-%%!%
  17. %/%%?%%-% /%{% "%º%:\"
  18.  
  19. Pause&Exit



Saludos.
10058  Programación / Scripting / Re: [Resuelto] Conversor de imagenes por lotes [Batch] en: 29 Diciembre 2012, 02:19 am
Así da gusto ayudar :xD

PD: No te recomiendo que te acostumbres a usar setlocal enabledelayedexpansion para procesar archivos. Setlocal enabledelayedexpansion es más rápido, pero tiene sus inconvenientes, usa "CALL".

Felices fiestas.
10059  Programación / Scripting / Re: Conversor de imagenes por lotes [Batch] en: 29 Diciembre 2012, 01:21 am
Hola,

Mi intención no es quitarle protagonismo al esfuerzo de Meine programmen, pero el code no cumple el requisito principal (Una carpeta "Procesados" por carpeta),
si se tienen 600 carpetas distintas para convertir, luego sería un caos para devolver los archivos convertidos a sus carpetas originales xD.

Te dejo mi versión, por si la necesitas:

Código
  1. @ECHO OFF
  2.  
  3. PUSHD "C:\Directorio raíz de las subcarpetas\" || (Exit /B 1)
  4.  
  5. For /R %%# in (*.jpg) Do (
  6. Echo [+] "%%~f#"
  7. MKDIR "%%~dp#PROCESADOS" 2>NUL
  8. (Start /W "" "C:\Users\Kurono\My Others\ImageMagick-6.8.0-10\convert.exe" "%%#" "%%~dp#PROCESADOS\%%~n#.png")
  9. REM Utiliza este comando en caso de no funcionar:
  10. REM Start /W /D "C:\Users\Kurono\My Others\ImageMagick-6.8.0-10\" convert.exe "%%#" "%%~dp#PROCESADOS\%%~n#.png"
  11. )
  12.  
  13. Pause&exit

Saludos
10060  Programación / Scripting / Re: [batch] cifrar codigo batch en: 28 Diciembre 2012, 19:39 pm
EDITO:
Si quieres, prueba a usar alguno de estos scripts,
Con un poco de maña puedes hacer que se auto-descifre el código en tiempo de ejecución agregando las variables y sus valores en el bat cifrado.







> [Ruby] [APORTE] Text Protector
> [Batch] [APORTE] Text Protector








> [BATCH] [APORTE] BatOfuser Ofuscador/Desofuscador para bats.
Páginas: 1 ... 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 [1006] 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines