|
8171
|
Programación / Programación General / Re: ¿Como puedo crear un SO?
|
en: 19 Septiembre 2013, 00:58 am
|
Pues lo que sea, pero hay que comprar algun derecho para crear un sistema operativo con eso? La pregunta era muy obvia, pero es que existe una cosa que se llama " buscar", y otra cosa que se llama " FAQ" (Frequently Asked Questions), si combinas esas dos proezas obtienes resultados como este: http://en.opensuse.org/openSUSE:SUSE_Studio_Faq#How_much_does_it_cost.3FPor cierto, en la misma página encontrarás un enlace a la "licencia" de SuseStudio, pero eso ya dejo que lo "busques" tú, de todas formas cuando instalas el software también te sale los términos de licencia... PD: De verdad no se como la gente pregunta cosas de este tipo cuando esa información siempre está en la propia web del producto o en su software... en este caso y en todos los demás. Saludos
|
|
|
8173
|
Programación / Scripting / Re: [BATCH] Duda
|
en: 18 Septiembre 2013, 18:40 pm
|
A mi me funcionan bien los tres, quizás tuviste un problema de conexión con el foro justo en ese momento, intenta de nuevo...
de todas formas no creo que cueste mucho abrir el primer enlace e ir bajando el post hasta los otros 2 puntos que he citado -.-
Saludos!
|
|
|
8174
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 18 Septiembre 2013, 15:25 pm
|
· FileSize Converter Convierte tamaños de unidades de almacenamiento #Region " FileSize Converter " ' [ FileSize Converter Function ] ' ' // By Elektro H@cker ' ' Examples : ' ' MsgBox(String.Format("92928374 bytes = {0} Bytes", FileSize_Converter(92928374, Units.bytes, Units.bytes).ToString("n0"))) ' Result: 92.928.374,00 Bytes ' MsgBox(String.Format("92928374 bytes = {0} KB", FileSize_Converter(92928374, Units.bytes, Units.kilobyte).ToString("n2"))) ' Result: 90.750,37 KB ' MsgBox(String.Format("92928374 bytes = {0} MB", FileSize_Converter(92928374, Units.bytes, Units.megabyte).ToString("n2"))) ' Result: 88,62 MB ' MsgBox(String.Format("50 GB = {0} Bytes", FileSize_Converter(50, Units.gigabyte, Units.bytes).ToString("n2"))) ' Result: 53.687.091.200,00 Bytes ' MsgBox(String.Format("50 GB = {0} KB", FileSize_Converter(50, Units.gigabyte, Units.kilobyte).ToString("n2"))) ' Result: 52.428.800,00 KB ' MsgBox(String.Format("50 GB = {0} MB", FileSize_Converter(50, Units.gigabyte, Units.megabyte).ToString("n2"))) ' Result: 51,200,00 MB Enum Units As Long bytes = 1L kilobyte = 1024L megabyte = 1048576L gigabyte = 1073741824L terabyte = 1099511627776L petabyte = 1125899906842624L End Enum Private Function FileSize_Converter(ByVal Size As Long, _ ByVal FromUnit As Units, _ ByVal ToUnit As Units) As Double Dim bytes As Double = Convert.ToDouble(Size * FromUnit) Dim result As Double = 0 If ToUnit < FromUnit Then Select Case ToUnit Case Units.bytes : result = bytes Case Units.kilobyte : result = bytes / Units.kilobyte Case Units.megabyte : result = bytes / Units.megabyte Case Units.gigabyte : result = bytes / Units.gigabyte Case Units.terabyte : result = bytes / Units.terabyte Case Units.petabyte : result = bytes / Units.petabyte Case Else : Return -1 End Select ElseIf ToUnit > FromUnit Then Select Case ToUnit Case Units.bytes : result = bytes Case Units.kilobyte : result = bytes * Units.kilobyte / Units.kilobyte ^ 2 Case Units.megabyte : result = bytes * Units.megabyte / Units.megabyte ^ 2 Case Units.gigabyte : result = bytes * Units.gigabyte / Units.gigabyte ^ 2 Case Units.terabyte : result = bytes * Units.terabyte / Units.terabyte ^ 2 Case Units.petabyte : result = bytes * Units.petabyte / Units.petabyte ^ 2 Case Else : Return -1 End Select ElseIf ToUnit = FromUnit Then result = Size End If Return result End Function #End Region
|
|
|
8175
|
Programación / Scripting / Re: Personalizar Batch
|
en: 18 Septiembre 2013, 12:39 pm
|
Call : ToWordCase "hello world" :ToWordCase Set "Alphabet=ABCDEFGHIJKLMNOPQRSTUVWXYZ" If " !Char!" EQU "a" (Set "X= %Alphabet:~0,1%" ) If " !Char!" EQU "b" (Set "X= %Alphabet:~1,1%" ) If " !Char!" EQU "c" (Set "X= %Alphabet:~2,1%" ) If " !Char!" EQU "d" (Set "X= %Alphabet:~3,1%" ) If " !Char!" EQU "e" (Set "X= %Alphabet:~4,1%" ) If " !Char!" EQU "f" (Set "X= %Alphabet:~5,1%" ) If " !Char!" EQU "g" (Set "X= %Alphabet:~6,1%" ) If " !Char!" EQU "h" (Set "X= %Alphabet:~7,1%" ) If " !Char!" EQU "i" (Set "X= %Alphabet:~8,1%" ) If " !Char!" EQU "j" (Set "X= %Alphabet:~9,1%" ) If " !Char!" EQU "k" (Set "X= %Alphabet:~10,1%" ) If " !Char!" EQU "l" (Set "X= %Alphabet:~11,1%" ) If " !Char!" EQU "m" (Set "X= %Alphabet:~12,1%" ) If " !Char!" EQU "n" (Set "X= %Alphabet:~13,1%" ) If " !Char!" EQU "o" (Set "X= %Alphabet:~14,1%" ) If " !Char!" EQU "p" (Set "X= %Alphabet:~15,1%" ) If " !Char!" EQU "q" (Set "X= %Alphabet:~16,1%" ) If " !Char!" EQU "r" (Set "X= %Alphabet:~17,1%" ) If " !Char!" EQU "s" (Set "X= %Alphabet:~18,1%" ) If " !Char!" EQU "t" (Set "X= %Alphabet:~19,1%" ) If " !Char!" EQU "u" (Set "X= %Alphabet:~20,1%" ) If " !Char!" EQU "v" (Set "X= %Alphabet:~21,1%" ) If " !Char!" EQU "w" (Set "X= %Alphabet:~22,1%" ) If " !Char!" EQU "x" (Set "X= %Alphabet:~23,1%" ) If " !Char!" EQU "y" (Set "X= %Alphabet:~24,1%" ) If " !Char!" EQU "z" (Set "X= %Alphabet:~25,1%" ) )
Así lo hice en Batch, saludos!
|
|
|
8176
|
Programación / Scripting / Re: Cambiar separador de campo
|
en: 18 Septiembre 2013, 12:04 pm
|
Te aconsejo que utilices un lenguaje con soporte para reemplazar mediante expresiones regulares (es decir, cualquier otro lenguaje menos Batch). Puedes utilizar el subgrupo 1 de ese RegEx. Saludos!
|
|
|
8177
|
Programación / Scripting / Re: Personalizar Batch
|
en: 17 Septiembre 2013, 23:52 pm
|
A veces, cuando pongo el nombre, por ejemplo Juan, me abre la carpeta de mis documentos, la cierro y ejecuto de nuevo, poniendo el mismo nombre y es a la segunda cuando funciona. Si eso es así entonces puede que estés creando la carpeta después de llamar al explorer y no antes? Lo de incrementar el sufijo del nombre de la carpeta, sólamente tienes que hacer un substring, es muy sencillo: http://ss64.com/nt/syntax-substring.htmlhoy no tengo mas tiempo, si no se me adelanta algún compañero mañana te muestro lo de poner las letras en WordCase, que eso requiere un poco más de elaboración. Saludos
|
|
|
8178
|
Programación / Programación General / Re: Ayuda xcopy batch
|
en: 17 Septiembre 2013, 23:11 pm
|
Es culpa mía, que hoy estoy un poco espeso, disculpa, Xcopy pide multiples confirmaciones... Puedes usar el sistema de exclusiones del comando XCopy, aunque es una mierd@ de sistema hablando en claro y muy limitado: Set "Dir1=D:\Directorio1" Set "Dir2=D:\Directorio2" (For /R %%# in ("*" ) do (Echo %%~nx# ))>>" %~dp0Exclude.txt" XCOPY /E /-Y "%Dir1%\*" "%Dir2%\" /EXCLUDE:Exclude.txt
Otra alternativa es hacer esto, queda bastante feo, y limitado (a la cantidad de "N"), pero si no necesitas copiar muchos archivos entonces te funcionará: Echo NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN |( XCOPY /E /-Y "D:\DIRECTORIO\1\*" "D:\DIRECTORIO\\2\" )
Saludos
|
|
|
8179
|
Programación / Programación General / Re: Ayuda xcopy batch
|
en: 17 Septiembre 2013, 21:24 pm
|
Lo tienes que poner a la izquierda, tal y como te mostré en mi ejemplo, piensa que la salida del comando (una "N") se lo quieres pasar al comando que hay después de la pipe "|", no al revés. Echo N |XCOPY /E /-Y "D:\Escritorio\1\*" "D:\Escritorio\2\"
PD: Usa las comillas dobles siempre sobretodo cuando trabajes con directorios, son muy importantes. Saludos!
|
|
|
8180
|
Programación / Programación General / Re: Ayuda xcopy batch
|
en: 17 Septiembre 2013, 21:09 pm
|
sabes que estoy probando y no me sale...
me lo cierra directamente o tira error de la forma que prueve ponerlo... Muestra tu código, estás cometiendo algún error de sintaxis saludos!
|
|
|
|
|
|
|