Golang Strings

Golang Strings

caleb’s code https://github.com/golang-book/bootcamp-examples todd’s code https://github.com/GoesToEleven/GolangTraining/ course outline https://goo.gl/EIbk7a Learn The Language - Golang Training https://goo.gl/DB1GvG Learn The Language - Great Golang Books https://www.golang-book.com/books/intro (Caleb Doxsey) http://amzn.to/1PmlB1w (Bill Kennedy) http://amzn.to/21nO1Mc (Donovan & Kernighan) http://amzn.to/1PmlKSB (Balbaert) Learn The Language - Quick Code Samples https://gobyexample.com/ Playlist of all videos in training https://goo.gl/WWCh9D Index of Videos https://goo.gl/SDgaEr ASK QUESTIONS & GET HELP https://forum.golangbridge.org/c/getting-help STAY CONNECTED G+ https://goo.gl/kWyztP https://twitter.com/Todd_McLeod https://www.youtube.com/user/toddmcleod NOTES ON THIS VIDEO: ROUNDING NUMBERS; add .5 then take the floor; MATH PACKAGE; STRING is just a series of characters; strings in golang use UTF-8; ASCII is a 7 bit character series; UTF-8 is those same 7 bits, ASCII, which is 128 letters, and for everything else it has multiple bytes; UTF-8 is a multiple byte character encoding; for everything else characters could be two bytes, or three bytes, or four bytes per character; things written in chinese probably will be four bytes per character; golang uses UTF-8 because Rob Pike & Ken Thompson were partially inventors of UTF-8; use DOUBLE QUOTES or BACKTICKS to create STRINGS; backticks can be multiple lines; strings support escape sequences like \n for newline or \t for a tab; you can see the golang spec “string literals” for a description of those escape sequences; we can get the LENGTH of a string by using LEN; this gives us THE NUMBER OF BYTES not the number of characters; (5:00); CONCATENATE strings with +; var str = “Hello world “ + “test”; this doesn’t work: var str = “Hello world “ + 5; this does work: var str = “Hello world “ + “5”; what about this var x int = 5; var str = “Hello world “ + strconv.Itoa(x); STRCONV ITOA; you can also do this: var str = “Hello world “ + fmt.Sprint(x); FMT SPRINT; (9:00); fmt.Sprint converts anything to a string; if you had x float64 and y int --- you could add them together with x + float64(y); conversion (10:00); or like this int(x) + y; ROUNDING again (11:00); math.Floor(x+0.5); or like this: int(x+.05); SLICING strings; var x string = “Hello world”; fmt.Println(x[2]); BYTE is a synonym for UINT8; PANIC (15:30); panic is goes way of dealing with bad errors; panics usually indicate the programmer screwed up; index out of range would be an example of a panic; BOOLEANS; operators: && || !

justforfunc #6: Flappy Gopher

justforfunc #6: Flappy Gopher

Have you ever played Flappy Bird? I'm sure you have! In this episode I decided to implement Flappy Gopher, a Go version of the famous game, using an SDL2 binding for Go. SDL2 binding for Go: https://github.com/veandco/go-sdl2 SDL2 documentation: https://wiki.libsdl.org/CategoryAPI Game art: http://opengameart.org/content/free-game-asset-grumpy-flappy-bird-sprite-sheets

The Rust Programming Language

The Rust Programming Language

Google Tech Talk June 6, 2015 (click "show more" for more information) Presented by Alex Crichton ABSTRACT Rust is an exciting new programming language that combines fine-grained control over memory layout and allocation patterns with memory and thread safety. It reached 1.0 in May and is rapidly gaining acceptance in projects including Servo (Mozilla's next generation parallel layout engine), a block store being developed by Dropbox, and numerous startups. Its features include zero-cost abstractions, move semantics, guaranteed memory safety, threads without data races, trait-based generics, pattern matching, type inference, minimal runtime, and efficient C bindings. ‚Alex Crichton will present an introduction to the Rust programming language, explain how it can be used to build performant, reliable systems, and answer your questions. Speaker Info: Alex Crichton ‚About the speaker: Alex Crichton is a member of the Rust core team working at Mozilla Research. He focuses on the standard library, Cargo, crates.io, and Rust's tooling and infrastructure experience. He's been at Mozilla for almost two years and graduated from Carnegie Mellon in 2013 with a BS in both Computer Science and Electrical and Computer Engineering.

Monads and Gonads

Monads and Gonads

Google Tech Talk January 15, 2013 (more info below) Presented by Douglas Crockford ABSTRACT The wonders of monads are finally revealed without resorting to Category Theory or Haskell. It turns out that monads are trivially expressed in JavaScript, and are one of the key enablers of Ajax. Monads are amazing. They are simple things, almost trivially implemented, with enormous power to manage complexity. But understanding them is surprisingly difficult, and most people, once they have that ah-ha moment, seem to lose the ability to explain them to others.

TOP 200 BEST GTA 5 FAILS EVER! (Funny Moments Grand Theft Auto V Compilation)

TOP 200 BEST GTA 5 FAILS EVER! (Funny Moments Grand Theft Auto V Compilation)

GTA 5 Funny Moments & Fails Gameplay! Grand Theft Auto V Brutal Kills Best Moments Compilation ★★★ LETS HIT 100,000 LIKES FOR ANOTHER SPECIAL!!! ★★★ ► Send your GTA 5 FAILS/WINS: https://www.prestigeclips.com/ These are the greatest and funniest moments from the last 10 GTA 5 FAILS episodes! Which clip was your fav? Thanks for all the ongoing support for the series. Subscribe if you want to see more! ► Store: Gaming T-Shirts/Hoodies: https://www.prestigeclips.com/ ► Social: • Facebook: http://tiny.cc/21604x • Twitter: http://tiny.cc/wz604x ► Submit a clip! • Send your GTA 5 FAILS/WINS: https://www.prestigeclips.com/ ▼ YouTube's character limit in descriptions does not allow me to list everyone in this special episode. To see more information on players in this special please visit the corresponding episode! Thanks so much to everyone who took part and congratulations on making it to the best moments! ► Tracks: Music from Monstercat Music: https://goo.gl/FbNDL ★ Please note: Prestige Clips has permission to feature the clips you see. Extra edits by Prestige Clips. If you steal any clips there will be consequences from the original owners or myself. Thanks to everyone who submits their clips to make these videos possible! :) Thanks for watching! -Marcus, Prestige Clips

Top Videos -  loading... Change country
Load 5 more videos
 
 
Sorry, You can't play this video
00:00/00:00
  •  
  •  
  •  
  •  
  •  
  •  
  •  
CLOSE
CLOSE
CLOSE