This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub UserForm_Activate() | |
ComboBox1.AddItem "Haber" | |
ComboBox1.AddItem "Debe" | |
ComboBox1.Text = ComboBox1.List(1) | |
TextBox1.Text = Date | |
ComboBox2.SetFocus | |
If Hoja1.Cells(1, 1) <> "" Then | |
For z = 1 To 500 | |
ComboBox2.AddItem Hoja1.Cells(z, 1) | |
Next z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton1_Click() | |
Rem posicion del indice en la celda 1,1 | |
indice = Hoja1.Cells(1, 1) | |
Rem si el indice es cero se cambia a uno | |
If indice = "" Then | |
indice = 1 | |
Hoja1.Cells(1, 1) = indice | |
End If | |
Rem incrementa el indice en 1 lugar que es la fila donde debe grabar | |
indice = indice + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub ComboBox1_Click() | |
Hoja3.Activate | |
ultimo = Hoja2.Cells(1, 1) | |
linea = 1 | |
For z% = 2 To ultimo | |
indice = z% | |
CodCliente = ComboBox1.ListIndex + 1 | |
If CodCliente = Hoja2.Cells(z%, 1) Then | |
monto = Hoja2.Cells(z%, 4) | |
If Hoja2.Cells(z%, 5) = "Debe" Then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub UserForm_Activate() | |
If Hoja1.Cells(1, 1) <> "" Then | |
For z = 1 To 500 | |
ComboBox1.AddItem Hoja1.Cells(z, 1) | |
Next z | |
Rem deja en blanco el combo | |
ComboBox1.Text = "" | |
End If | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max = None | |
min= None | |
while True: | |
num = raw_input("Enter a number: ") | |
if num == "done" : break | |
if len(num)<1 : break | |
try: | |
num = float(num) | |
except : | |
print "Invalid input" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hrs = raw_input("Enter Hours:") | |
hors=float(hrs) | |
rate = raw_input("Enter Rate:") | |
rate1=float(rate) | |
total=hors*rate1 | |
print type(hors), type(rate1), type (total) | |
print total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mDMEYi64TRYJKwYBBAHaRw8BAQdAvxSLwojlecR+pEe8oEd+jnoqLqifnp7TX2Hj | |
gZDYnk+0JVRvbWFzIEJyYWRhbm92aWMgPHRvbWJyYWQyQGdtYWlsLmNvbT6ImgQT | |
FgoAQhYhBNhzBG0vkYcgkjjPP+mOQtSh7d8/BQJiLrhNAhsDBQkDwxUzBQsJCAcC | |
AyICAQYVCgkICwIEFgIDAQIeBwIXgAAKCRDpjkLUoe3fP4wuAP9RGBMSZAWCPQpR | |
NxqCVadL9GrLytPx9f7i2KE05A0a0wEA33EKlbFaaFN56frpFpRhOl6ltuAiDKBi | |
+jCwjo2Gsg+4OARiLrhNEgorBgEEAZdVAQUBAQdA5P5bwvxr45+hPLgcRCwLMeTK | |
+/JE2dsxW2ly3X+ZRCgDAQgHiH4EGBYKACYWIQTYcwRtL5GHIJI4zz/pjkLUoe3f | |
PwUCYi64TQIbDAUJA8MVMwAKCRDpjkLUoe3fP2ydAP9DqJ8ZnHRoWXoaGqcGk4rC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
arduino = serial.Serial('/dev/ttyACM0',9600) | |
while True: | |
comando = raw_input('Introduce un comando: ') | |
arduino.write(comando) | |
if comando == 'H': | |
print('LED ENCENDIDO') | |
elif comando == 'L': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
arduino = serial.Serial('/dev/ttyACM0',9600) | |
while True: | |
comando="H" | |
arduino.write(comando) | |
print('LED ENCENDIDO') | |
arduino.close()#FINALIZA LA COMUNICACION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
arduino = serial.Serial('/dev/ttyACM0',9600) | |
comando="L" | |
arduino.write(comando) | |
print('LED APAGADO') | |
arduino.close()#FINALIZA LA COMUNICACION |