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
| #include <Ultrasonic.h> | |
| #include <Wire.h> | |
| #include <LiquidCrystal_I2C.h> | |
| #include <Adafruit_MLX90614.h> | |
| Ultrasonic front_ultrasonic(10, 9); | |
| Ultrasonic back_ultrasonic(12, 11); | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); | |
| Adafruit_MLX90614 mlx = Adafruit_MLX90614(); |
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 uuid | |
| class Booking(models.Model): | |
| booking_no = models.CharField(primary_key=True, default=uuid.uuid4().hex[:5].upper(), max_length=50, editable=False) | |
| def __str__(self): | |
| return str(self.booking_no) |
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
| #!/usr/bin/python | |
| import MySQLdb as mdb | |
| import sys | |
| try: | |
| con = mdb.connect('localhost', 'USERNAME MYSQL', 'PASSWORD MYSQL', 'NAMA DATABASE'); | |
| cur = con.cursor() | |
| cur.execute("SELECT VERSION()") | |
| ver = cur.fetchone() |
NewerOlder