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


Tema destacado: Únete al Grupo Steam elhacker.NET


  Mostrar Mensajes
Páginas: 1 ... 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 [875] 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 ... 1254
8741  Programación / .NET (C#, VB.NET, ASP) / Re: Error al capturar texto de pagina web VB.NET 2008 en: 14 Julio 2013, 05:20 am
Habría sido genial que hubiesen encontrado una solución usando requests.

Aunque no he comentado nada al respecto pero la verdad es que este tema me interesa bastante y estuve probando varias cosas para conseguir resolverlo,
desde permitir headers inseguros en la aplicación (activar los unsafeheaders) para corregir el problema de los headers, pero siempre se queda colgado con la url de shoutcast,
también estuve indagando en dos sources de dos proyectos de Shoutcast en CodeProject, pero eran streamrippers y no obtenian la información necesaria, es más estan un poco obsoletos,
Me llegué a mirar decenas de resultados en todo Google pero parece que nadie en todo el mundo tiene idea de como corregir el problema principal de los headers con la url de shoutcast, siempre se comenta los unsafeheaders, pero los unsafeheaders no sirven para este problema.

...Lo dicho, estaría muy bien que un experto en la materia diese una solución más sutil que usar un webbrowser.

@LuckyLucciano
Me alegro de que lo hayas conseguido.

Saludos
8742  Programación / .NET (C#, VB.NET, ASP) / Re: Como hacer que al escrinbir en un textbox en otro salga otro texto en: 14 Julio 2013, 05:11 am
-> TextBox.TextChanged Event
8743  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda con almacenar ruta en: 13 Julio 2013, 19:03 pm
Un ejemplo:

Código
  1. Public Class Form1
  2.  
  3.    ReadOnly DefaultFolder As String = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Screenshots")
  4.  
  5.    Public FolderDialog As New FolderBrowserDialog With {.SelectedPath = DefaultFolder}
  6.  
  7.    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Shown
  8.  
  9.        MsgBox(FolderDialog.SelectedPath) ' Esta es la ruta que quieres, al iniciar el programa.
  10.  
  11.        If FolderDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
  12.            MsgBox(FolderDialog.SelectedPath) ' Y esta es después, cuando el usuario la elige.
  13.        End If
  14.  
  15.        ' Crear snapshot en {FolderDialog.SelectedPath}
  16.        ' Sin variables de por medio.
  17.  
  18.    End Sub
  19.  
  20. End Class

Saludos
8744  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda con almacenar ruta en: 13 Julio 2013, 18:51 pm
Código
  1. Private Sub CheckFolder_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckFolder.CheckedChanged
  2.        If CheckFolder.Checked = True Then
  3.            FolderBrowserDialog1.ShowDialog()
  4.            LabelFolder.Text = FolderBrowserDialog1.SelectedPath() 'Aqui va la ruta de la carpeta que se selecciono
  5.        Else
  6.            LabelFolder.Text = Folder 'Si por algun motivo quiero usar nuevamente la carpeta "Screenshots". Pero la elimine por accidente
  7.            CheckFolder.Checked = False
  8.            Folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Screenshots")
  9.            If Not Directory.Exists(Folder) Then
  10.                Directory.CreateDirectory(Folder)
  11.            End If
  12.        End If
  13.    End Sub
  14.  

El problema es que en ningún caso estás asignando la carpeta seleccionada (FolderBrowserDialog1.SelectedPath) a la variable Folder, así que la variable Folder siempre es: blablabla.Desktop & "Screenshots"

¿Resuelve eso tu duda?

Otra cosa (Sin importancia) a tener en cuenta en el código, es esto:
Código
  1. CheckFolder.Checked = False

Lo explico con código:
Código
  1. If CheckFolder.Checked = True Then
  2.          bla bla bla
  3.      Else ' Else, sólo puede haber una condicion contradictoria en un Boolean, y es "False", "CheckFolder.Checked = False"
  4.          CheckFolder.Checked = False ' Así que esto no hace nada, porque si se procesa esta parte del bloque significa que la propiedad "Checked" ya está en "False".
  5. End If

Saludos
8745  Programación / .NET (C#, VB.NET, ASP) / Re: [SOLUCIONADO] ¿Como modificar el nivel de audio (ganancia) de un archivo wav? en: 13 Julio 2013, 17:38 pm
Lo que no sé es si pones: Soundvolume = 2; 'Te doblará el sonido o se ajustará al máximo normal?

No se puede doblar el volumen :P, al menos no con la Class de los Waves, con la Class de los MP3 no lo sé, aunque me imagino que será igual.

Saludos
8746  Seguridad Informática / Seguridad / Re: Protección contra ataques (DDOS) en: 13 Julio 2013, 11:43 am
gracias ikillnukes

Era demasiado bueno para ser cierto
8747  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 13 Julio 2013, 11:41 am
Una class para manejar Audios en la librería NAudio.

(Es algo corta, lo sé, no he experimentado más cosas que las que necesito de esta librería)

Código
  1. #Region " NAudio "
  2.  
  3. Public Class NAudio_Helper
  4.  
  5.    ' [ NAudio ]
  6.    '
  7.    ' // By Elektro H@cker
  8.    '
  9.    ' Instructions:
  10.    ' 1. Add a reference for the "NAudio.dll" file into the project.
  11.    '
  12.    ' Examples:
  13.    '
  14.    ' Dim Stream As NAudio.Wave.WaveFileReader = New NAudio.Wave.WaveFileReader(File)
  15.    '
  16.    ' Set_Volume(Stream, 0.5)
  17.    ' Play_Sound(Stream, 1)
  18.    ' Play_Sound(My.Resources.AudioFile)
  19.    ' Play_Sound("C:\File.wav")
  20.  
  21.  
  22.    ' Play Sound (File)
  23.    Private Sub Play_Sound(ByVal File As String, _
  24.                           Optional ByVal Volume As Single = Nothing)
  25.  
  26.        Dim Wave As New NAudio.Wave.WaveOut
  27.  
  28.        Select Case File.Split(".").Last.ToLower
  29.            Case "aiff"
  30.                Wave.Init(New NAudio.Wave.AiffFileReader(File))
  31.            Case "mp3"
  32.                Wave.Init(New NAudio.Wave.Mp3FileReader(File))
  33.            Case "wav"
  34.                Wave.Init(New NAudio.Wave.WaveFileReader(File))
  35.            Case Else
  36.                Wave.Init(New NAudio.Wave.BlockAlignReductionStream(NAudio.Wave.WaveFormatConversionStream.CreatePcmStream(New NAudio.Wave.AudioFileReader(File))))
  37.        End Select
  38.  
  39.        If Not Volume = Nothing Then Wave.Volume = Volume
  40.        Wave.Play()
  41.  
  42.    End Sub
  43.  
  44.    ' Play Sound (MemoryStream)
  45.    Private Sub Play_Sound(ByVal Stream As IO.MemoryStream, _
  46.                           Optional ByVal Volume As Single = Nothing)
  47.  
  48.        Dim Wave As New NAudio.Wave.WaveOut
  49.        Wave.Init(New NAudio.Wave.BlockAlignReductionStream(NAudio.Wave.WaveFormatConversionStream.CreatePcmStream(New NAudio.Wave.WaveFileReader(Stream))))
  50.        If Not Volume = Nothing Then Wave.Volume = Volume
  51.        Wave.Play()
  52.  
  53.    End Sub
  54.  
  55.    ' Play Sound (Unmanaged MemoryStream)
  56.    Private Sub Play_Sound(ByVal Stream As IO.UnmanagedMemoryStream, _
  57.                           Optional ByVal Volume As Single = Nothing)
  58.  
  59.        Dim Wave As New NAudio.Wave.WaveOut
  60.        Wave.Init(New NAudio.Wave.BlockAlignReductionStream(NAudio.Wave.WaveFormatConversionStream.CreatePcmStream(New NAudio.Wave.WaveFileReader(Stream))))
  61.        If Not Volume = Nothing Then Wave.Volume = Volume
  62.        Wave.Play()
  63.  
  64.    End Sub
  65.  
  66.    ' Play Sound (NAudio Stream)
  67.    Private Sub Play_Sound(ByVal NAudio_Stream As Object, _
  68.                           Optional ByVal Volume As Single = Nothing)
  69.  
  70.        Dim Wave As New NAudio.Wave.WaveOut
  71.        Wave.Init(NAudio_Stream)
  72.        If Not Volume = Nothing Then Wave.Volume = Volume
  73.        Wave.Play()
  74.  
  75.    End Sub
  76.  
  77.    ' Set Volume (NAudio Stream)
  78.    Private Function Set_Volume(ByVal NAudio_Stream As Object, ByVal Volume As Single) _
  79.    As NAudio.Wave.WaveOut
  80.  
  81.        Dim Wave As New NAudio.Wave.WaveOut
  82.        Wave.Init(NAudio_Stream)
  83.        Wave.Volume = Volume
  84.        Return Wave
  85.  
  86.    End Function
  87.  
  88. End Class
  89.  
  90. #End Region
8748  Programación / .NET (C#, VB.NET, ASP) / Re: [SOLUCIONADO] ¿Como modificar el nivel de audio (ganancia) de un archivo wav? en: 13 Julio 2013, 10:18 am
Listo:

Código
  1. Play_Sound(my.resources.WavFile)

Código
  1.    ' Play Sound
  2.    Private Sub Play_Sound(ByVal Sound As IO.UnmanagedMemoryStream)
  3.        Dim Wave1 As New NAudio.Wave.WaveOut
  4.        Wave1.Init(New NAudio.Wave.BlockAlignReductionStream(NAudio.Wave.WaveFormatConversionStream.CreatePcmStream(New NAudio.Wave.WaveFileReader(Sound))))
  5.        Wave1.Volume = Soundvolume ' Single num
  6.        Wave1.Play()
  7.    End Sub
8749  Programación / .NET (C#, VB.NET, ASP) / Re: ¿Como modificar el nivel de audio (ganancia) de un archivo wav? en: 13 Julio 2013, 09:00 am
No es justo lo que buscas pero te ayudará:

Era justo lo que necesitaba :), Gracias @OmarHack.
8750  Programación / Scripting / Re: QPF to Chapter file en: 13 Julio 2013, 08:57 am
Código
  1. Set FSO = CreateObject("Scripting.FileSystemObject")
  2.  
  3. For Each File In FSO.GetFolder(".\").Files
  4. If LCase(FSO.GetExtensionName(File.Name)) = "qpf" then
  5. Wscript.echo(File.Name)
  6. end if
  7. Next
Páginas: 1 ... 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 [875] 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines