What do you want to save?
Add Code snippet
New code examples
-
Go 2021-09-13 13:39:03
extract value from interface in golang
// extracts interface value to known string type. func extractValueFromInterface(value interface{}) { str, ok := value.(string) if ok { fmt.Printf("string value is: %q\n", str) } else { fmt.Printf("value is not a string: %v\n", ... Add solution -
Javascript 2021-09-06 08:43:03
currentTime(); javascript
var d = new Date("2020-12-09T05:30:51.01"); d.getHours(); // => 05 d.getMinutes(); // => 30 d.getSeconds(); // => 51 /*2020 stand for year 12 stands for moth and 09 stands for the date. the T there seperates the date and time !!!IMPOR... Add solution