I read some tests about Kobo. Nice to know people are satisfied. Definitely will look at it again.
xtapa
I use the app too, but I don't want that as my main reading device because e-ink feels way more comfortable on the eyes.
Papers please should be playable with one hand only and is great at burning time
Can you use it on colored clothes? Borax acts as bleach so I'm a bit skeptical.
Looks great, thanks!
I think this level of derailing in a post about trains is irresponsible.
Ja
Tut mir leid, Japan-Fanboys und -Girls.
Tabi (jap. 足袋) sind eine Art von knöchelhohen japanischen Socken mit abgeteiltem großem Zeh.
Sie werden üblicherweise zu Zōri oder Geta (beides Sandalen) getragen.
Quelle: Wikipedia
Tabi (Socken) 足袋 Traditionelle Socken bestehen meist aus weißem, festem Baumwollstoff mit abgeteiltem großen Zeh.
Zôri 草履 (Sandalen) Zôri-Sandalen gehören zum Kimono
Quelle: Deutsch-Japanische Gesellschaft München
Es SIND Socken in Sandalen.
Hersteller sprechen von Temposchwelle.
I personally try to avoid deeply nested if/else. Or else in general, because I think it makes code more readable. Especially when one of the branches is just an exit condition.
if exitCondition {
return false
}
// long ass code execution
is way more readable than
if !exitCondition {
// long ass code execution
} else {
return false
}
In a loop, you can just return the value instead of passing it to a "retVal" variable.
With those in mind, you could refactor HasPermissions to
func (r *RBAC) HasPermission(assignedRoles []string, requiredPermission string, visited map[string]bool) bool {
for _, assigned := range assignedRoles {
if visited[assigned] {
continue
}
role, ok := r.Roles[assigned]
if !ok {
//role does not exist, so skip it
continue
}
for _, permission := range role.Permissions {
if permission.String() == requiredPermission {
//Permission has been found! Set permitted to true and bust out of the loop
return true
}
}
//check inherited roles
if permitted := r.HasPermission(role.Inherits, requiredPermission, visited); permitted {
return true
}
}
return false
}
The same could be applied to LoadJSONFile and I think that really would approve the readability and maintainability of your code.
edit: This refactor is not tested
Your "statistics" are fantasy numbers, not statistics. And statistics or probabilities, no matter how low or high, are not proof.
It has been slow and doing weird stuff for years now. It's first or second edition so it is quite old. I don't know if a battery change will fix getting stuck in boot screen.