No
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úCita de: msdl en 30 Abril 2012, 21:16 PM
is it possible to invoke this API (without using strptr or varptr) ?
'KERNEL32
Private Declare Function VarPtr__ Lib "KERNEL32" Alias "MulDiv" (ByRef a As Any, Optional ByVal b As Long = 1, Optional ByVal c As Long = 1) As Long
'MSVBVM60
Private Declare Sub GetMem4 Lib "MSVBVM60" (ByVal lPtr As Long, ByRef ret As Long)
'USER32
Private Declare Function MessageBoxW Lib "USER32" (ByVal hWnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal wType As Long) As Long
Private Sub Form_Load()
Dim cadena As String
Dim ptr1 As Long
Dim ptr2 As Long
cadena = "karcrack"
ptr1 = StrPtr(cadena)
'StrPtr__
Call GetMem4(VarPtr__(cadena) + 4, ptr2)
MsgBox (ptr1 = ptr2)
Call MessageBoxW(0, ptr2, 0, 0)
Call MessageBoxW(0, ptr1, 0, 0)
End Sub
'KERNEL32
Private Declare Function ObjPtr__ Lib "KERNEL32" Alias "MulDiv" (ByVal a As Any, Optional ByVal b As Long = 1, Optional ByVal c As Long = 1) As Long
Private Sub Form_Load()
Dim ptr1 As Long
Dim ptr2 As Long
ptr1 = ObjPtr(Me)
ptr2 = ObjPtr__(Me)
MsgBox (ptr1 = ptr2)
End Sub
def count_letters(s,clean_null=False):
r=dict(zip(map(chr,range(0,256)), [0]*255))
for c in s:
r[c]+=1
if clean_null:
r = dict([(k,i) for k,i in r.items() if i>0])
return r
print count_letters(raw_input(),True)
hola, saludos a todos
{'a': 3, ' ': 3, 'd': 2, 'h': 1, 'l': 2, 'o': 4, ',': 1, 's': 3, 'u': 1, 't': 1}
def palindromo(s):
return (len(s)<2)or(s[0]!=s[-1])or(palindromo(s[1:-1]))
print palindromo(raw_input())
ping 1.2.3.4 -n 1 -w %TIEMPO_EN_MILISEGUNDOS% >NUL
waitfor /T %TIEMPO_EN_SEGUNDOS% karcrack_ejemplo >NUL