Still relevant [WayBack] When did we stop caring about memory management? – Scott Hanselman
Via: [WayBack] Jeroen Wiert Pluimers – Google+
–jeroen
Posted by jpluimers on 2020/09/29
Still relevant [WayBack] When did we stop caring about memory management? – Scott Hanselman
Via: [WayBack] Jeroen Wiert Pluimers – Google+
–jeroen
Posted in Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/09/29
As a (then) go lang n00b, the less upvoted answers helped me e lot: [WayBack] variables – What is “_,” in a Golang declaration? – Stack Overflow:
The Go compiler won’t allow you to create variables that you never use.
for i, value := range x { total += value }
The above code will return an error message “i declared and not used”.
Since we don’t use i inside of our loop we need to change it to this:
for _, value := range x { total += value }
_
is the blank identifier. Meaning the value it should be assigned is discarded.Here it is the value of
example
key that is discarded. The second line of code would discard the presence boolean and store the value inprs
.
So to only check the presence in the map, you can discard the value. This can be used to use a map as a set.
–jeroen
Posted in Development, Go (golang), Software Development | Leave a Comment »
Posted by jpluimers on 2020/09/29
Cool, this works in a Mac and Linux too: mssql extension for VS Code.
Links:
–jeroen
Posted in .NET, Database Development, Development, Software Development, SQL Server, Visual Studio and tools, vscode Visual Studio Code | Leave a Comment »