|
7471
|
Programación / Scripting / Re: No puedo iniciar un bat desde otro batch windows 7 que ascooo
|
en: 12 Marzo 2014, 00:10 am
|
Hola No es aconsejable utilizar el comando start de esa manera. La mejor manera de aprender es dándote tu mismo cuenta del porqué. Escribe en consola: ¿Que ves? START ["título"] [/D ruta] Entonces, ¿que le falta a tu comando?, el parámetro donde debes especificar el "título". start "GTA RIP" "D:\GTAndroidRipeado\com.rockstargames.gtasa\main.2.com.rockstargames.gtasa\audio\n\Bank_022\sss.bat" Saludos
|
|
|
7472
|
Programación / Python / Re: [Python] Traductor Ingles-Español
|
en: 12 Marzo 2014, 00:07 am
|
A mi la ausencia de una API gratis no me impide seguir utilizando GoogleTranslate enviando peticiones por web, ¿te lo has planteado?, es reálmente sencillo, aunque, claro, más incómodo, y el grado de eficiencia resultante sería la eficacia que tu tengas al momento de parsear la respuesta. Ahora, en Python no tengo ni conozco ningún código para esto, pero si te sirviera en VB.NET, solo dímelo. PD: Aquí puedes encontrar muchos ejemplos en Python. Saludos!
|
|
|
7473
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets)
|
en: 11 Marzo 2014, 21:08 pm
|
Determina si un caracter es diacrítico o si contiene una marca diacrítica (no es 100% efectivo con caracteres demasiado raros de otras culturas) ' Character Is Diacritic? ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(CharacterIsDiacritic("á")) ' Result: True ' ''' <summary> ''' Determines whether a character is diacritic or else contains a diacritical mark. ''' </summary> ''' <param name="Character">Indicates the character.</param> ''' <returns><c>true</c> if character is diacritic or contains a diacritical mark, <c>false</c> otherwise.</returns> Public Function CharacterIsDiacritic(ByVal Character As Char) As Boolean If String.IsNullOrEmpty(CharacterIsDiacritic) Then Return False Else Dim Descomposed As Char() = Character.ToString.Normalize(System.Text.NormalizationForm.FormKD).ToCharArray Return (Descomposed.Count <> 1 OrElse String.IsNullOrWhiteSpace(Descomposed)) End If End Function
Convierte un caracter diacritico ' Convert Diacritic Character ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(ConvertDiacritic("á", UnicodeNormalization:=System.Text.NormalizationForm.FormKD)) ' Result: 'a' ' ''' <summary> ''' Converts the diacritic characters in a String to an equivalent normalized English characters. ''' </summary> ''' <param name="Character"> ''' Indicates the diacritic character. ''' </param> ''' <param name="UnicodeNormalization"> ''' Defines the type of Unicode character normalization to perform. ''' (Default is 'NormalizationForm.FormKD') ''' </param> ''' <returns>The converted character.</returns> Public Function ConvertDiacritic(ByVal Character As Char, Optional ByVal UnicodeNormalization As System.Text.NormalizationForm = System.Text.NormalizationForm.FormKD) As String Dim Chars As Char() = CStr(Character).Normalize(System.Text.NormalizationForm.FormKD).ToCharArray For Each c As Char In Chars Select Case Globalization.CharUnicodeInfo.GetUnicodeCategory(c) Case Globalization.UnicodeCategory.NonSpacingMark, Globalization.UnicodeCategory.SpacingCombiningMark, Globalization.UnicodeCategory.EnclosingMark ' Do nothing. Exit Select Case Else Return c End Select Next c Return Character End Function
Obtiene el keyboardlayout ' Get Keyboard Layout ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetKeyboardLayout(IntPtr.Zero)) ' Result: 10 ' MsgBox(GetKeyboardLayout(Process.GetCurrentProcess.MainWindowHandle)) ' Result: 10 ' ''' <summary> ''' Retrieves the active input locale identifier (formerly called the keyboard layout). ''' </summary> ''' <param name="idThread"> ''' A window handle identifier of the thread to query, or 'IntPtr.Zero' to query the current thread. ''' </param> ''' <returns> ''' The return value is the input locale identifier for the thread. ''' </returns> Public Shared Function GetKeyboardLayout(Optional ByVal idThread As IntPtr = Nothing) As Short Return BitConverter.GetBytes(APIGetKeyboardLayout(idThread)).First End Function ''' <summary> ''' Retrieves the active input locale identifier (formerly called the keyboard layout). ''' </summary> ''' <param name="idThread"> ''' A window handle identifier of the thread to query, or 'IntPtr.Zero' to query the current thread. ''' </param> ''' <returns> ''' The return value is the input locale identifier for the thread. ''' ''' The low-order byte contains a Language Identifier for the input language, ''' and the high-order byte contains a device handle to the physical layout of the keyboard. ''' </returns> <System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint:="GetKeyboardLayout", CharSet:=System.Runtime.InteropServices.CharSet.Unicode)> Private Shared Function APIGetKeyboardLayout( Optional ByVal idThread As IntPtr = Nothing ) As UInteger End Function
Obtiene el keycode de un caracter (ojo, no el keycode virtual). ' Get KeyCode ' ( By Elektro ) ' ' Usage Examples: ' MsgBox(GetKeyCode("a")) ' Result: 65 ' MsgBox(GetKeyCode("á")) ' Result: 65 ' MsgBox(GetKeyCode("á", IntPtr.Zero)) ' Result: 65 ' MsgBox(GetKeyCode("a", Process.GetCurrentProcess.MainWindowHandle)) ' Result: 65 ' 'Private Sub Test() Handles MyBase.Shown ' Dim sb As New System.Text.StringBuilder ' Dim Characters As Char() = "ABCDEFGHIJKLMNOPQRSTUVWXYZ ñÑçÇ áéíóú ÁÉÍÓÚ àèìòù ÀÈÌÒÙ äëïÖÜ ÄËÏÖÜ º\'¡`+´-.,ª!·$%&/()=?¿".ToCharArray ' For Each c As Char In Characters ' sb.AppendFormat("Character: {0}", CStr(c)) ' sb.AppendLine() ' sb.AppendFormat("KeyCode : {0}", CStr(GetKeyCode(c, IntPtr.Zero))) ' MessageBox.Show(sb.ToString) ' sb.Clear() ' Next c 'End Sub ''' <summary> ''' Translates a character to the corresponding keycode. ''' </summary> ''' <param name="Character">Indicates the character.</param> ''' <param name="KeyboardLayout">Indicates the keyboard layout.</param> ''' <returns> ''' If the function succeeds, the return value contains the keycode. ''' ''' If the function finds no key that translates to the passed character code, ''' the return value contains "-1". ''' </returns> Public Shared Function GetKeyCode(ByVal Character As Char, Optional ByVal KeyboardLayout As IntPtr = Nothing) As Short ' Get the Keycode of the character. Dim Keycode As Short = BitConverter.GetBytes(VkKeyScanEx(Character)).First Select Case Keycode Case Is <> 255S ' Character is found on the current KeyboardLayout. Return Keycode Case Else ' Character is not found on the current KeyboardLayout. ' Descompose the character. Dim Descomposed As Char() = Character.ToString.Normalize(System.Text.NormalizationForm.FormKD).ToCharArray ' If character is diacritic then... If Descomposed.Count <> 1 OrElse String.IsNullOrWhiteSpace(Descomposed) Then For Each c As Char In Descomposed Select Case Globalization.CharUnicodeInfo.GetUnicodeCategory(c) Case Globalization.UnicodeCategory.NonSpacingMark, Globalization.UnicodeCategory.SpacingCombiningMark, Globalization.UnicodeCategory.EnclosingMark ' Do nothing. Exit Select Case Else ' Character is diacritic so we convert the diacritic and try to find the Keycode. Return GetKeyCode(c, KeyboardLayout) End Select Next c End If ' Chars.Count <> 1 End Select ' Keycode Return -1S ' Character is not diacritic and the keycode is not found. End Function ''' <summary> ''' Translates a character to the corresponding virtual-key code and shift state. ''' The function translates the character using the input language and ''' physical keyboard layout identified by the input locale identifier. ''' For more info see here: ''' http://msdn.microsoft.com/en-us/library/ms646332%28v=VS.85%29.aspx ''' </summary> ''' <param name="c">Indicates the character.</param> ''' <param name="KeyboardLayout">Indicates the keyboard layout.</param> ''' <returns> ''' If the function succeeds, ''' the low-order byte of the return value contains the virtual-key code, ''' and the high-order byte contains the shift state. ''' ''' If the function finds no key that translates to the passed character code, ''' both the low-order and high-order bytes contain '255'. ''' </returns> <System.Runtime.InteropServices.DllImport("user32.dll", CharSet:=System.Runtime.InteropServices.CharSet.Unicode)> Private Shared Function VkKeyScanEx( ByVal c As Char, Optional ByVal KeyboardLayout As IntPtr = Nothing ) As Short End Function
Envio de peticion por el método POST ' Send POST ' ( By Elektro ) ' ' Usage Examples: ' 'Dim Response As String = ' SendPOST("http://es.wikipedia.org/wiki/Special:Search?", ' New Dictionary(Of String, String) From { ' {"search", "Petición+POST"}, ' {"sourceid", "Mozilla-search"} ' }) ' Formated POST Data: "search=Petición+POST&sourceid=Mozilla-search" 'Clipboard.SetText(Response) ' Copy the response to Clipboard. ' ''' <summary> ''' Sends a POST method petition and returns the server response. ''' </summary> ''' <param name="URL">Indicates the URL.</param> ''' <param name="PostData">Indicates the post data.</param> ''' <returns>The response.</returns> Public Function SendPOST(ByVal URL As String, ByVal PostData As Dictionary(Of String, String)) As String Dim Data As New System.Text.StringBuilder ' PostData to send, formated. Dim Request As Net.HttpWebRequest = HttpWebRequest.Create(URL) ' HTTP Request. Dim Response As HttpWebResponse ' Server response. Dim ResponseContent As String ' Server response result. ' Set and format the post data of the query. For Each Item As KeyValuePair(Of String, String) In PostData Data.AppendFormat("{0}={1}&", Item.Key, Item.Value) Next Item ' Set the Request properties. With Request .Method = "POST" .ContentType = "application/x-www-form-urlencoded" .ContentLength = Data.ToString.Length .Proxy = Nothing ' .UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0" End With ' Write the POST data bytes into the Stream. Using RequestStream As IO.Stream = Request.GetRequestStream() RequestStream.Write(System.Text.Encoding.UTF8.GetBytes(Data.ToString), 0, Data.ToString.Length) RequestStream.Close() End Using ' Get the response. Response = Request.GetResponse() ' Get the response content. Using Reader As New IO.StreamReader(Response.GetResponseStream) ResponseContent = Reader.ReadToEnd Response.Close() End Using ' Return the response content. Return ResponseContent End Function
|
|
|
7475
|
Sistemas Operativos / Windows / Re: problemas con ms dos ayuda
|
en: 11 Marzo 2014, 16:47 pm
|
me di cuenta que no tengo la carpeta (system32) dice (system) calculo que es lo mismo tampoco tengo en mi computadora la carpeta que me señalas "WinSXS" o sea directamente no existe en mi computadora Es técnicamente imposible que no existan dichas carpetas en tu SO. La carpeta System32 (no System, esa no es importante) es el corazón de Windows, almacena los drivers de tus dispositivos así como la configuración del Bootloader y todas las herramientas que necesita usar tu SO (comandos externos de Batch, PowerShell, MMC, etc) junto a sus configuraciones de idioma, y casi todos los archivos esenciales que Windows necesita para cargar el sistema, sin esta carpeta, no podrías iniciar Windows. La carpeta WinSXS se puede reducir de tamaño consideráblemente eliminando gran parte de las copias de seguridad de archivos que contiene la carpeta, pero la carpeta en si misma no se puede eliminar complétamente, ya que almacena otros archivos importantes de los que depende Windows para cargarse. ¿Has comprobado que las carpetas no están símplemente ocultas?, deben existir. No suelo decir esto, pero dado el extraño caso donde cosas que deberían estar (WBEM), no estan, y otras cosas que deberían ser visibles por defecto pero están invisibles o...no se sabe donde están ubicadas (System32), te recomiendo que hagas una reinstalación limpia del SO. Saludos!
|
|
|
7477
|
Programación / .NET (C#, VB.NET, ASP) / Re: ¿cifrar?
|
en: 11 Marzo 2014, 15:03 pm
|
@KZN
Hola
Me gustaría aclararte que no tienes que preocuparte no incumples ninguna norma del foro por publicar urls de contenido educativo (Ej: "¿Como hacer...?") ya sea de temática Hacking, Cracking, Malware, o de lo que sea... siempre que no implique actos delictivos (Ej: "¿Como hackear el Facebook de tu novia?") (nótese la diferencia de ética).
Por otro lado, también quiero aclarar (aclarar, sin ánimo de ofender), que ese artículo que muestras no tiene nada que ver con esto, ahí se están bloqueando carpetas, no cifrando texto, y no usan ningún algoritmo, solo usan el comando Rename/Cacls del lenguaje de la utilidad Batch, mientras que aquí se está hablando del lenguaje C#.
PD: Porfavor, que alguien mueva esto a .NET para no atraer más confusiones por parte de otros usuarios.
Saludos!
|
|
|
7478
|
Programación / Scripting / Re: [AYUDA][VBS] Pasar varios argumentos en un acceso directo
|
en: 11 Marzo 2014, 12:38 pm
|
Ya te solucionaron el punto 2, respondiendo al punto 1 e diré que: Solo tienes que modificar el icono del tipo de archivo registrado como 'VBSFile': HKEY_CLASSES_ROOT\VBSFile\DefaultIcon Por el icono del tipo de archivo registrado como 'jpegfile': HKEY_CLASSES_ROOT\jpegfile\DefaultIcon Pero, óbviamente, este cambio requiere de un reinicio o relogueo del usuario actual. Otra forma de cambiar el icono, de forma permanente e inmediata, sería usar una utilidad (Ej: ExeScript Editor) para 'compilar' el archivo VBS en un EXE, y modificar el icono del archivo executable. Saludos
|
|
|
7479
|
Foros Generales / Foro Libre / Re: Alguna vez os ha pasado?
|
en: 11 Marzo 2014, 02:34 am
|
¿Es como cuando empiezas a quitarle el sujetador a una "hembra"? No, Rando, yo te explico: Por el día es más bien como cuando se te queda la hebilla del sujetador enganchada y no puedes desabrocharlo, a pesar de que has hecho ese movimiento de manos cientos de veces, pero la tensión del día no te deja hacerlo, y los nervios van en aumento, al llegar la noche, después de estar intentándolo todo el día, tu cerebro se relaja y por fin consigues quitar esa maldita hebilla, y de repente sientes ese momento de euforia por haberlo conseguido, y por el orgasmo que viene después ...que según el 'estudio psicológico' ese nos dice que dura hasta las 3 de la madrugada  . Así que según datos científicos a mi me quedan 20 minutos de orgasmo para programar, pero mi cerebro está muy distraido viendo ' La que se avecina' xD. Saludos
|
|
|
|
|
|
|