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
| AutoHotkey v2: Flexible Collections |
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
| Go: Strong Typing for Collections |
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
| #Requires AutoHotkey v2.0.2+ | |
| #SingleInstance Force | |
| DetectHiddenWindows true | |
| ; Hotkey: Ctrl+Alt+O to organize desktop files | |
| ^!o:: { | |
| organizDesktopFiles() | |
| } | |
| ; Hotkey: Ctrl+Alt+S to take a screenshot and save with timestamp |
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 ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| ) | |
| type User struct { | |
| ID int `json:"id"` |
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
| #Requires AutoHotkey v2.0.2+ | |
| #SingleInstance Force | |
| DetectHiddenWindows true | |
| readConfigFile(fileName) { | |
| try { | |
| fileObj := FileOpen(fileName, "r") | |
| if !fileObj { | |
| throw Error("Could not open file") | |
| } |
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 ( | |
| "fmt" | |
| "os" | |
| ) | |
| func readConfigFile(fileName string) (string, error) { | |
| data, err := os.ReadFile(fileName) | |
| if err != nil { |
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
| #Requires AutoHotkey v2.0.2+ | |
| #SingleInstance Force | |
| ; Global counter for demonstration | |
| downloadCount := 0 | |
| ; Start three "concurrent" downloads | |
| SetTimer(downloadImage, 2000) ; Run after 2 seconds | |
| SetTimer(downloadVideo, 3000) ; Run after 3 seconds | |
| SetTimer(downloadDoc, 1000) ; Run after 1 second |
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 ( | |
| "fmt" | |
| "time" | |
| ) | |
| func downloadFile(fileName string, duration time.Duration) { | |
| fmt.Printf("Starting download: %s\n", fileName) | |
| time.Sleep(duration) // Simulate download 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func downloadFile(fileName string, duration time.Duration) { | |
| fmt.Printf("Starting download: %s\n", fileName) | |
| time.Sleep(duration) // Simulate download 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
| #Requires AutoHotkey v2.0.2+ | |
| #SingleInstance Force | |
| ; Regular function | |
| greetUser(name) { | |
| return "Hello, " . name | |
| } | |
| ; Function that takes a function as parameter | |
| applyOperation(x, y, operationFunc) { |
NewerOlder