- Author: Mark Allen Weiss
- Publisher: Addison-Wesley, 1999
- ISBN-10: 0-201-35754-2 (0201357542)
- ISBN-13: 978-0-201-35754-7 (9780201357547)
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
| FS0:\EFI\ubuntu\shimx64.efi |
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 (bt *BlinkyTape) playPattern(p Pattern, delay time.Duration) { | |
| bt.clear() | |
| L: | |
| for _, frame := range p { | |
| bt.setFrame(frame) | |
| if err := bt.render(); err != nil { | |
| log.Fatalf("render error: %s\n", err) | |
| } |
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 (bt *BlinkyTape) animation(p Pattern, repeat int, delay time.Duration) { | |
| bt.status = Running | |
| innerLoop := func() bool { | |
| select { | |
| case <-bt.stop: | |
| return false | |
| default: | |
| go bt.playPattern(p, delay) | |
| <-bt.next |
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 (bt *BlinkyTape) animation(p Pattern, repeat int, delay time.Duration) { | |
| bt.status = Running | |
| L: | |
| for i := 0; repeat < 0 || i < repeat; i++ { | |
| select { | |
| case <-bt.stop: | |
| break L | |
| default: | |
| go bt.playPattern(p, delay) |
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
| // Shortest GUI program written in Golang. | |
| // It displays a window and exits after 5 seconds. | |
| package main | |
| import ( | |
| "time" | |
| "golang.org/x/exp/shiny/driver" | |
| "golang.org/x/exp/shiny/screen" | |
| ) |
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
| #!/bin/bash | |
| # The first release available is golang:1.2.0 | |
| major=1 | |
| minor=2 | |
| patch=0 | |
| while true | |
| do | |
| while true |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // Shortest GUI program written in Golang. | |
| // It displays a window and exits when the "close" button of the window is clicked. | |
| package main | |
| import ( | |
| "golang.org/x/exp/shiny/driver" | |
| "golang.org/x/exp/shiny/screen" | |
| // Despite that the package names have a "mobile" prefix, | |
| // these packages works on desktop. |
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 AppKit | |
| let app = NSApplication.shared | |
| app.setActivationPolicy(.regular) | |
| let window = NSWindow( | |
| contentRect: NSMakeRect(0, 0, 640, 480), | |
| styleMask: [.titled, .closable], | |
| backing: .buffered, | |
| defer: true |
OlderNewer