| Field | Value |
|---|---|
| Latitude | 36.79887 |
| Longitude | 12.01467 |
| Time | 18/01/2023 12:21 |
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
| WITH gis(point) AS (VALUES('POINT(12.01 36.79)')) | |
| SELECT * FROM hotspot | |
| WHERE ST_Distance(location, GeogFromText(gis.point)) < 2000; |
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
| CREATE TABLE hotspot ( | |
| id UUID PRIMARY KEY, | |
| location GEOGRAPHY NOT NULL, | |
| created_at TIMESTAMP NOT NULL | |
| ); |
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
| use piston_window::*; | |
| fn main() { | |
| // Create a new Piston window | |
| let mut window: PistonWindow = WindowSettings::new("Pong Game", [640, 480]) | |
| .exit_on_esc(true) | |
| .build() | |
| .unwrap(); | |
| // Set up the game objects (paddles and ball) |
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
| // "Pong Game", by ChatGPT | |
| use piston_window::*; | |
| fn main() { | |
| // Create a new Piston window | |
| let mut window: PistonWindow = WindowSettings::new("Pong Game", [640, 480]) | |
| .exit_on_esc(true) | |
| .build() | |
| .unwrap(); |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "strings" | |
| "time" | |
| ) |
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
| func main() { | |
| targetPtr := flag.String("target", ".", "path to the Go program") | |
| revisionPtr := flag.String("revision", "", "a version number for the executable. If not explicitly set, gozip uses the current datetime") | |
| flag.Parse() | |
| fmt.Println("target", *targetPtr) | |
| fmt.Println("revision", *revisionPtr) | |
| } |
| Command Name | Description |
|---|---|
| command | Enters in SDK mode |
| takeoff | Auto takeoff |
| land | Auto landing |
| up x | Ascend to "x" cm |
| down x | Descend to "x" cm |
| right x | Fly right for “x” cm |
| left x | Fly left for “x” cm |
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
| void setup() { | |
| Wire.begin(27, 26); | |
| Serial.begin(115200); | |
| Serial1.begin(1000000, SERIAL_8N1, 23, 18); | |
| Wire.setClock(400000); | |
| // Initializes the LED matrix to show a moving text. It will be disabled later by `matrix_effect_deinit` | |
| tt_matrix.Init(255); |
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
| void move_sprite() { | |
| while(1) { | |
| tt_matrix.SetAllPWM((uint8_t *)sprite_a); | |
| delay(500); | |
| tt_matrix.SetAllPWM((uint8_t *)sprite_b); | |
| delay(500); | |
| } | |
| } |
NewerOlder