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


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Mensajes
Páginas: 1 ... 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 [955] 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 ... 1254
9541  Programación / Desarrollo Web / Re: ¿ Como cambiar el fondo de color ? en: 19 Marzo 2013, 16:02 pm
El color naranja de tu htm es eso, un color sólido.

El gradiante no es un color, es un efecto de varios tonos de colores conjuntos, y los estilos (efectos, gradiantes) se hacen manejando CSS, si usas DreamWeaver los estilos de CSS te los hace en 1 segundo casi sin esfuerzo vaya!

Un saludo!
9542  Programación / Scripting / Re: Base de datos desde archivo de texto. en: 19 Marzo 2013, 15:57 pm
¿Entonces lo de añadir datos a la base desde la consola ya no quieres?

A ver si no he entendido mal:
Ahora sólo sería obtener el valor numérico de la tercera palabra de la primera línea, o sería de cada tercera palabra de cada línea? y en fín si el número es mayor de "X", que te mande un email.

La manera más sencilla desde Windows es Batch, para lo del email puedes usar esta utilidad Commandline (no requiere autentificación de ningún tipo): https://www.zeta-uploader.com/es

Esto comprueba el tercer token de cada línea, si es mayor que "X" envía un email.
He usado como delimitador el caracter del espacio, quizás debas modificarlo a tus necesidades...



Código
  1. @Echo OFF
  2.  
  3. Set "Max=100"
  4. Set "Interval=5"
  5.  
  6. :Loop
  7. Echo [%TIME:~0,-3%] Checkando...
  8. For /F "Usebackq Tokens=1-3* Delims= " %%A in ("Archivo.txt") Do (
  9. If %%C GTR %MAX% (
  10. Echo [%TIME:~0,-3%] Variable: %%C es mayor que %MAX%, enviando email...
  11. Zulc.exe -receivers="tuemail@hot.com" -remarks="Test remark" -subject="Test subject")
  12. )
  13. )
  14. (Ping -n %INTERVAL% Localhost >NUL) & (GOTO :LOOP)

9543  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 19 Marzo 2013, 15:32 pm
@arts
la verdad es que según tengo entendido entre las comprbocaciones de IF y Select Case no hay diferencia así que creo que deben ser igual.




Generador de captchas.





Código
  1. #Region " Captcha Generator Function "
  2.  
  3.    ' [ Captcha Generator Function ]
  4.    '
  5.    ' Instructions:
  6.    ' Copy the Captcha Class into a new Class "Captcha.vb"
  7.    '
  8.    ' Examples :
  9.    ' Dim myCaptcha As New Captcha
  10.    ' PictureBox1.Image = myCaptcha.GenerateCaptcha(5) ' Generate a captcha of 5 letters
  11.    ' MsgBox(myCaptcha.Check(TextBox1.Text, True)) ' Check if the given text is correct
  12.  
  13.  
  14.    ' Captcha.vb
  15. #Region " Captcha Class "
  16.  
  17.    Imports System.Drawing
  18.    Imports System.Drawing.Drawing2D
  19.  
  20.    Public Class Captcha
  21.  
  22.        Dim cap As String
  23.  
  24.        Public ReadOnly Property CaptchaString As String
  25.            Get
  26.                Return cap
  27.            End Get
  28.        End Property
  29.  
  30.        ' Generate Captcha
  31.        Function GenerateCaptcha(ByVal NumberOfCharacters As Integer) As Bitmap
  32.            Dim R As New Random
  33.            Dim VerticalLineSpaceing As Integer = R.Next(5, 10) ' The space between each horizontal line
  34.            Dim HorisontalLineSpaceing As Integer = R.Next(5, 10) ' The space between each Vertical line
  35.            Dim CWidth As Integer = (NumberOfCharacters * 120) 'Generating the width
  36.            Dim CHeight As Integer = 180 ' the height
  37.            Dim CAPTCHA As New Bitmap(CWidth, CHeight)
  38.            Dim allowedCharacters() As Char = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM123456789".ToCharArray 'Guess
  39.            Dim str(NumberOfCharacters - 1) As Char ' The String to turn into a captcha
  40.  
  41.            For i = 0 To NumberOfCharacters - 1
  42.                str(i) = allowedCharacters(R.Next(0, 61)) ' Generating random characters
  43.            Next
  44.  
  45.            Using g As Graphics = Graphics.FromImage(CAPTCHA)
  46.  
  47.                ' the gradient brush for the background
  48.                Dim gradient As New Drawing2D.LinearGradientBrush(New Point(0, CInt(CHeight / 2)), New Point(CWidth, CInt(CHeight / 2)), Drawing.Color.FromArgb(R.Next(&HFF7D7D7D, &HFFFFFFFF)), Drawing.Color.FromArgb(R.Next(&HFF7D7D7D, &HFFFFFFFF)))
  49.  
  50.                g.FillRectangle(gradient, New Rectangle(0, 0, CWidth, CHeight))
  51.                Dim plist As New List(Of Point) ' the list of points the curve goes through
  52.  
  53.                For i = 0 To str.Length - 1
  54.                    Dim FHeight As Integer = R.Next(60, 100) 'Font height in EM
  55.                    Dim Font As New Font("Arial", FHeight)
  56.                    Dim Y As Integer = R.Next(0, (CHeight - FHeight) - 40) 'Generating the Y value of a char: will be between the top  and (bottom - 40) to prevent half characters
  57.                    Dim X As Integer = CInt((((i * CWidth) - 10) / NumberOfCharacters))  'Some formula that made sense At the time that I typed it to generate the X value
  58.                    Dim p As New Point(X, Y)
  59.  
  60.                    g.DrawString(str(i).ToString, Font, Brushes.Black, p)
  61.  
  62.                    plist.Add(New Point(X, R.Next(CInt((CHeight / 2) - 40), CInt((CHeight / 2) + 40)))) ' add the points to the array
  63.                Next
  64.  
  65.                plist.Add(New Point(CWidth, CInt(CHeight / 2))) 'for some reason it doesn't go to the end so we manually add the last point
  66.                Dim ppen As New Pen(Brushes.Black, R.Next(5, 10)) ' the pen used to draw the curve
  67.                g.DrawCurve(ppen, plist.ToArray)
  68.                Dim pen As New Pen(Brushes.SteelBlue, CSng(R.Next(1, 2))) 'the pen that will draw the horisontal and vertical lines.
  69.  
  70.                ' Drawing the vertical lines
  71.                For i = 1 To CWidth
  72.                    Dim ptop As New Point(i * VerticalLineSpaceing, 0)
  73.                    Dim pBottom As New Point(i * VerticalLineSpaceing, CHeight)
  74.                    g.DrawLine(pen, ptop, pBottom)
  75.                Next
  76.  
  77.                ' Drawing the horizontal lines
  78.                For i = 1 To CHeight
  79.                    Dim ptop As New Point(0, i * HorisontalLineSpaceing)
  80.                    Dim pBottom As New Point(CWidth, i * HorisontalLineSpaceing)
  81.                    g.DrawLine(pen, ptop, pBottom)
  82.                Next
  83.  
  84.                ' Drawing the Black noise particles
  85.                Dim numnoise As Integer = CInt(CWidth * CHeight / 25) 'calculating the  number of noise for the block. This will generate 1 Noise per 25X25 block of pixels if im correct
  86.  
  87.                For i = 1 To numnoise / 2
  88.                    Dim X As Integer = R.Next(0, CWidth)
  89.                    Dim Y As Integer = R.Next(0, CHeight)
  90.                    Dim int As Integer = R.Next(1, 2)
  91.                    g.FillEllipse(Brushes.Black, New Rectangle(X, Y, R.Next(2, 5), R.Next(2, 5))) 'Size of the white noise
  92.                Next
  93.  
  94.                ' Drawing the white noise particles
  95.                For i = 1 To numnoise / 2
  96.                    Dim X As Integer = R.Next(0, CWidth)
  97.                    Dim Y As Integer = R.Next(0, CHeight)
  98.                    Dim int As Integer = R.Next(1, 2)
  99.                    g.FillEllipse(Brushes.White, New Rectangle(X, Y, R.Next(2, 5), R.Next(2, 5))) 'Size of the white noise
  100.                Next
  101.  
  102.            End Using
  103.  
  104.            cap = str
  105.            Return CAPTCHA
  106.        End Function
  107.  
  108.        ' Check captcha
  109.        Function Check(ByVal captcha As String, Optional ByVal IgnoreCase As Boolean = False) As Boolean
  110.            If IgnoreCase Then
  111.                If captcha.ToLower = CaptchaString.ToLower Then
  112.                    Return True
  113.                Else
  114.                    Return False
  115.                End If
  116.            Else
  117.                If captcha = CaptchaString Then
  118.                    Return True
  119.                Else
  120.                    Return False
  121.                End If
  122.            End If
  123.        End Function
  124.  
  125.    End Class
  126.  
  127. #End Region
  128.  
  129. #End Region
9544  Sistemas Operativos / Windows / Re: Buscador imvu en: 19 Marzo 2013, 14:37 pm
Esto es lo que te respondí en otro foro (por si no lo llegases a ver):



Cita de: quetzalcoatl67;1042863925
ya he comprobado que no me aparezca en los programas
La solución no es ocultarlo, sinó desinstalarlo. ¿Te refieres a la barra de programas de Firefox, o en la lista de programas instalados de Windows?


De todas formas sigue los pasos oficiales de desinstalación de IMVU:

http://imvuinc.ourtoolbar.com/help/

How do I uninstall the IMVU Inc toolbar?
Citar

Firefox users

    In the Firefox browser menu, select Add-ons > Extensions.
    Select the IMVU Inc Community Toolbar.
    Click Remove.


How do I enable or disable the search page that appears when I open a new tab?

Citar
Firefox users

    Open the toolbar's main menu (by clicking on the arrow immediately to the right of the toolbar's logo).
    Select Toolbar Options and then click the Additional Settings tab.
    Select or clear the check box next to: "Show a search box on new browser tabs."

How do I remove the IMVU Inc toolbar's customized Web Search?

Citar
Firefox users

    Open your browser's Search Engine menu (upper-right corner of your browser) by clicking the arrow.
    Choose Manage Search Engines…
    Select IMVU Inc Customized Web Search.
    Click the Remove button, and then click OK.


9545  Programación / Scripting / Re: Base de datos desde archivo de texto. en: 19 Marzo 2013, 14:28 pm
Bueno, no somos adivinos, ¿Windows o Linux?

No manejo las bases de datos MySQL así que desconozco como hacerlo, pero podría ser algo así:

AddData.bat
Código
  1. @Echo OFF
  2. For /F "Usebackq Tokens=*" %%X in ("Archivo.txt") Do (... "campo1" "%%X")


Quizás esto te sirva:

Google + "commandline add entry to mysql"

Citar
To insert data into MySQL table you would need to use SQL INSERT INTO command. You can insert data into MySQL table by using mysql> prompt or by using any script like PHP.
Syntax:

Here is generic SQL syntax of INSERT INTO command to insert data into MySQL table:

INSERT INTO table_name ( field1, field2,...fieldN )

www.tutorialspoint.com/mysql/mysql-insert-query.htm

http://www.ntchosting.com/mysql/insert-data-into-table.html

http://www.iis-aid.com/articles/how_to_guides/creating_mysql_database_via_the_command_line

http://dev.mysql.com/doc/refman/5.0/en/
9546  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] ¿Como se puede cancelar una operación de FileCopy? en: 19 Marzo 2013, 14:28 pm
Si creo una aplicación y uso los metodos de "IO" o por ejemplo "My.Computer.FileSystem.CopyFile" para copiar un archivo de 50 GB, y cierro la aplicación, la operación de copiado reside en segundo plano y no se detiene hasta que el archivo haya sido copiado, así que parece ser que Windows es quien decide esto...

Mi pregunta es: ¿Se puede cancelar una operación de copiado?
y: ¿Se puede hacer de alguna manera segura? (no me gustaría que se corrompieran los datos del disco duro, o algo parecido)

No encuentro info en ningún lado

un saludo!
9547  Programación / Scripting / Re: Acciones sobre archivos de texto. [Batch] en: 19 Marzo 2013, 13:26 pm
@XWatmin

Acciones sobre archivos de texto. [Batch]

¿Que tiene que ver tu pregunta con la temática de este hilo?

La máquina Arcade es la que se llama "Sega model 2", el emulador todavía no sabemos cual es su nombre, hay muchos emuladores que corren roms de la SM2.

Infórmate sobre el nombre real del emulador que estás usando, después ve a la página oficial del emulador y descárgatelo, debe incluir un archivo de documentación y allí te debe indicar las opciones CommandLine del emulador para ejecutar una ROM, si la documentación no está en el emulador entonces debe estar en la página web oficial, así encontrarás lo que necesitas.

De todas formas has puesto mal el slash (la barra vertical), prueba así:
Código:
Emulator.exe ".\roms\daytona.zip" 

Si te quedan dudas no sigas este tema aquí o me veré obligado a eliminarlo, haz el favor de crear un nuevo post para formular preguntas que no estén relacionadas con archivos de texto.

Saludos.
9548  Informática / Software / Re: Configuracion de Google Chrome en: 19 Marzo 2013, 13:02 pm
@OmarHack

Son Bots, esos usuarios son registros con nombres aleatórios y los mensajes se postean automáticamente del mismo modo, con scripts o software dedicado.

PD: Te lo comento para que no malgastes el tiempo hablándole a una máquina!

PD2: El spam dudo que séa ilegal en ningún país, prohibido sí (y sólo a criterio del Administrador de "X" página, no al criterio de ninguna ley), ilegal no.
En España tenemos algo que se llama "Libertad de expresión", spam virtual, spam visual, spam oral, y spam táctil, en fín los tiempos de Franco quedaron atrás...

Saludos!
9549  Programación / .NET (C#, VB.NET, ASP) / Re: Compatibilidad de fuentes TrueType personalizadas... en: 19 Marzo 2013, 11:18 am
Bueno, ya he encontrado la manera de hacerlo:

Código
  1. Public Class Main
  2.    Dim MyFont As New CustomFont(My.Resources.kakakaka)
  3.  
  4.    Private Sub Main_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed
  5.        MyFont.Dispose()
  6.    End Sub
  7.  
  8.    Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load
  9.        Me.Label1.Font = New Font(MyFont.Font, 12.0!)
  10.    End Sub
  11. End Class

Saludos!
9550  Programación / .NET (C#, VB.NET, ASP) / [TUTORIAL] Instalar controles de terceros en VS2012 desde la consola de Windows. en: 19 Marzo 2013, 10:33 am
Hola!

Desde que empecé a aprender VisualStudio siempre tuve interés por poder instalar controles de una manera automatizada, ya que suelo hacer mis própios instaladores personalizados, y mis tests  con la IDE de VS en máquinas virtuales, y allí tengo que instalar cada control que necesito manuálmente...

Actualmente hay varias (pocas) aplicaciones que nos ayudan a instalar controles de forma automática, el gran problema es que todas están desactualizadas para poder instalar un control en la versión 11 de VisualStudio (VS2012), hasta ahora...

Un usuario al que le estoy muy agradecido ha renovado el source de un antiguo proyecto (TCI), es una utilidad CommandLine para poder instalar controles en cualquier versión de VS, y la verdad es que es magnifica, se instalan en pocos segundos.

Aquí tienen el source:
http://www.imagingshop.com/download/toolbox-integration.zip

Y aquí la utilidad compilada:
http://elektrostudios.tk/DTE.zip

Instrucciones de uso:
Código:
DteToolboxInstaller.exe [install|uninstall] [vs2005|vs2008|vs2010|vs2012] [tab name] [assembly path]

Por ejemplo, si quieren instalar el control "SampleControl.dll" que va incluido en el zip, en la ToolBar de VS2012, hay que usarlo de esta manera:
Código:
DteToolboxInstaller.exe install vs2012 "Nombre del TAB" "SampleControl.dll"

Artículo completo: http://www.componentowl.com/articles/visual-studio-toolbox-control-integration#integration-dte

Espero que a muchos les sirva...

Un saludo!
Páginas: 1 ... 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 [955] 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines