In your command-line run the following commands:
brew doctorbrew update
In your command-line run the following commands:
brew doctorbrew update| type T struct { | |
| A int | |
| B string | |
| } | |
| t := T{23, "skidoo"} | |
| s := reflect.ValueOf(&t).Elem() | |
| typeOfT := s.Type() | |
| for i := 0; i < s.NumField(); i++ { |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Test struct { | |
| Name string | |
| } |
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Map map[string]string | |
| type Object struct { |
| package goddrinksjava; | |
| /** | |
| * The program GodDrinksJava implements an application that | |
| * creates an empty simulated world with no meaning or purpose. | |
| * | |
| * @author momocashew | |
| * @lyrics hibiyasleep | |
| */ | |
| #!/bin/bash | |
| # | |
| # ----------------------- | |
| # | |
| # This is a script that installs docker-ce (Docker Community Edition) on Debian 9 | |
| # Inspired by https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42 | |
| # | |
| # ----------------------- | |
| # Pre-requesite |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |