rana, pone los otros codigos tambien.
No solamente los que buscan en arrays.
Manejando arrays soy un queso.
No solamente los que buscan en arrays.
Manejando arrays soy un queso.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúPublic Function FibonacciChecker_eCode(ByRef lNumero As Long) As Boolean
Dim FiSplit() As String
Dim i As Long
Const Fi As String = "0,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368"
FiSplit() = Split(Fi, ",", -1, vbBinaryCompare)
For i = 0 To 23
If lNumero = CLng(FiSplit(i)) Then FibonacciChecker_eCode = True: Exit Function
If lNumero < CLng(FiSplit(i)) Then FibonacciChecker_eCode = False: Exit Function
Next i
End Function
Public Function IsFibonacci_eCode(ByRef lNumber As Long) As Boolean
Dim i As Long 'anterior
Dim y As Long 'actual
Dim x As Long 'Restultado a checkear
y = 1
Do While x < lNumber
If x = lNumber Then IsFibonacci_eCode = True: Exit Function
x = i + y
i = y
y = x
Loop
IsFibonacci_eCode = False
End Function
Public Function IsFibonacci_eCodeMatrix(ByRef lNumero As Long) As Boolean
Dim f() As Long
Dim i As Long
ReDim f(1)
f(0) = 0
f(1) = 1
i = 2
Do
Debug.Print i; ","; f(i - 1)
If lNumero = f(i - 1) Then IsFibonacci_eCode = True: Exit Function
If lNumero < f(i - 1) Then IsFibonacci_eCode = False: Exit Function
ReDim Preserve f(i)
f(i) = f(i - 1) + f(i - 2)
i = i + 1
Loop
End Function
Public Function IsFibonacci(ByRef lNumber As Long) As Boolean
Dim i As Long 'anterior
Dim y As Long 'actual
Dim x As Long 'Restultado a checkear
i = 1
y = 1
Do While x < lNumber
x = i + y
i = y
y = x
If x = lNumber Then IsFibonacci = True: Exit Function
Loop
IsFibonacci = False
End Function
================================================================================
º Contest Name : ObtenerNombreArchivo
º Explanation : Mas claro, hechale agua
º Arguments : C:\Documents and Settings\Llamazares\Mis documentos\Downloads\SexoDeRanas.avi
º Loops : 1000
º Date & Hour : 02-14-2011 <-> 13:47:25
================================================================================
Results [compiled] :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.- MrFrogGetFileFast -> 23,140550 msec
2.- SacarFilenameE_C -> 25,971375 msec
3.- SacarFilenameE_Cv2 -> 29,063666 msec
4.- getFileNameIgnorante -> 31,133647 msec
5.- SacarFilenameE_CB -> 33,288770 msec
6.- getFileNameIgnoranteMODSeba -> 37,030797 msec
7.- GetFilename123 -> 37,921469 msec
8.- nombre_archivoGrester -> 48,419315 msec
9.- Fn7913 -> 257,055627 msec
================================================================================
º The following functions returns incorrect results :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.- StripPathSeba
================================================================================
>>> Test made by cFrogContest.cls <-> Visit foro.elhacker.net <<<
================================================================================
================================================================================
º Contest Name : ObtenerNombreArchivo
º Explanation : Mas claro, hechale agua
º Arguments : C:\Documents and Settings\Llamazares\Mis documentos\Downloads\SexoDeRanas.avi
º Loops : 1000
º Date & Hour : 02-13-2011 <-> 18:48:31
================================================================================
Results [compiled] :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.- SacarFilenameE_C -> 24,129044 msec
2.- SacarFilenameE_Cv2 -> 27,445965 msec
3.- getFileNameIgnorante -> 30,370386 msec
4.- getFileNameIgnoranteMODSeba -> 36,459560 msec
5.- GetFilename123 -> 38,079072 msec
6.- nombre_archivoGrester -> 46,986994 msec
7.- Fn7913 -> 256,390794 msec
================================================================================
º The following functions returns incorrect results :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.- GetFileMrFrog
2.- StripPathSeba
================================================================================
>>> Test made by cFrogContest.cls <-> Visit foro.elhacker.net <<<
================================================================================
Private cFC As New cFrogContest '// Class declaration.
Private Declare Sub PathStripPath Lib "shlwapi.dll" Alias "PathStripPathA" (ByVal pszPath As String)
Private Declare Function GetFileTitle Lib "comdlg32.dll" Alias "GetFileTitleA" (ByVal lpszFile As String, ByVal lpszTitle As String, ByVal cbBuf As Integer) As Integer
Public Function SacarFilenameE_C(ByRef sPath As String) As String
SacarFilenameE_C = StrReverse$(Left$(StrReverse$(sPath), InStr(1, StrReverse(sPath), "\", vbBinaryCompare) - 1))
End Function
Public Function SacarFilenameE_Cv2(ByRef sPath As String) As String
SacarFilenameE_Cv2 = Right$(sPath, Len(sPath) - InStrRev(sPath, "\", Len(sPath), vbBinaryCompare))
End Function
Public Static Function GetFileMrFrog(ByRef sFile As String) As String
GetFileMrFrog = RightB$(sFile, InStrRev(sFile, "\") * 2 - 2)
End Function
Public Function getFileNameIgnorante(ByVal path As String) As String
Dim cM As Integer
cM = InStrRev(path, "\") + 1
If cM = 0 Then Exit Function
getFileNameIgnorante = Mid(path, cM)
End Function
Public Function StripPathSeba(ByVal sPath As String) As String
Call PathStripPath(sPath)
StripPathSeba = sPath
End Function
Public Function getFileNameIgnoranteMODSeba(ByVal path As String) As String
getFileNameIgnoranteMODSeba = Mid$(path, InStrRev(path, "\") + 1)
End Function
Public Function nombre_archivoGrester(ByVal Ruta As String) As String
Dim partes() As String
partes = Split(Ruta, "\")
nombre_archivoGrester = partes(UBound(partes))
End Function
Public Function Fn7913(ByVal sPath As String) As String
Dim Buffer As String
Buffer = String(255, 0)
GetFileTitle sPath, Buffer, Len(Buffer)
Fn7913 = Left$(Buffer, InStr(1, Buffer, Chr$(0)) - 1)
End Function
Public Function GetFileName123(ByRef vPath As String) As String
GetFileName123 = Right$(vPath, Len(vPath) - InStrRev(vPath, "\"))
End Function
Private Sub Form_Load()
With cFC
.ContestName = "ObtenerNombreArchivo" '// The constest name.
.Explanation = "Mas claro, hechale agua" '// Little explanation.
.SaveDirectory = App.path '// Directory where you saved the test.
.ReplaceFile = True '// To overwrite the file.
.Functions "Fn7913,GetFileMrFrog,GetFilename123,getFileNameIgnorante,getFileNameIgnoranteMODSeba,nombre_archivoGrester,SacarFilenameE_C,SacarFilenameE_Cv2,StripPathSeba" '// Name of the functions.
.Arguments "C:\Documents and Settings\Llamazares\Mis documentos\Downloads\SexoDeRanas.avi" '// Arguments of functions (must be the same in all functions).
.NumberOfLoops = 1000 '// Number of Loop to call them.
.Result = "SexoDeRanas.avi" '// This result should give functions.
.SetObject Me '// Object (needed to make the calls).
.TestIt '// Execute the test and save it.
.ShowTest '// Shows the txt file.
End With
End
End Sub
Public Function SacarFilenameE_C(ByRef sPath As String) As String
SacarFilenameE_C = StrReverse$(Left$(StrReverse$(sPath), InStr(1, StrReverse$(sPath), "\", vbBinaryCompare) - 1))
End Function
Public Function SacarFilenameE_Cv2(ByRef sPath As String) As String
SacarFilenameE_Cv2 = Right$(sPath, Len(sPath) - InStrRev(sPath, "\", Len(sPath), vbBinaryCompare))
End Function
si existe el archivo "c:\program files\a.exe" & existe el archivo "c:\a.txt" entonces
Haces la vertical en el bidet
sino
miras un video XXX de mr Frog O.o?
finsi