# <!-- METAHEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"*": "https://raw.githubusercontent.com/wefindx/schema/master/method/oo-item.yaml"
# <!-- HEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"base:title": "0oo - Errors have resumable error codes"
"og:title": "Errors have resumable error codes"
"og:description": "Assuming you have a nested loop, ``` for letter in letters: for number in numbers: for symbol in symbols: print(letter + number + symbol) ``` If the code fails halfway through, you print out ERROR-letter-number-symbol. Then you use the following function to calculate the Nth position in the product list: [Link to the stackoverflow](https://stackoverflow.com/questions/72882207/whats-the-mathematical-formula-for-a-nested-loop) ``` def position(list_of_lists, tup): t = 1 res = 0 for lst, x in zip(reversed(list_of_lists), reversed(tup)): res += t * lst.index(x) t *= len(lst) return res ``` From this point we can resume the loop!"
"og:image": "https://avatars0.githubusercontent.com/u/28134655"
"og:url": "/method/152001/"
"base:css": "/static/css/bootstrap.min.9c25540d6272.css"
"base:extra-css": "/static/css/base.57997aeac1df.css"
"base:favicon": "/static/favicon.acaa334f0136.ico"
"base:body_class": ""
"layout:logo": "/static/0oo.8d2a8bbef612.svg"
"layout:index": "/"
"layout:menu": "/menu/"
"layout:categories": "/intents/"
"layout:ideas": "/methods/"
"layout:projects": "/projects/"
"layout:users": "/users/"
"layout:about": "/about/"
"layout:help": "/help/"
"layout:bug_report": "https://github.com/wefindx/0oo"
"layout:login": "/accounts/login/"
"layout:light-off": "/darken/?darken=true"
"layout:set-multilingual": "/mulang/?mulang=true"
"layout:lang": "语言"
"layout:set-language-post-action": "/i18n/setlang/"
"layout:csrf-token": "kpEbmFupyb3m4GjZ051W8HineAxei6YzjYqZnwAOUl9ZnnTaQzG3tuBQSAzaw4Nd"
"layout:input-next": "/method/152001/"
"layout:languages": [{"code": "ja", "is-active": "false", "name": "日本語"}, {"code": "lt", "is-active": "false", "name": "Lietuviškai"}, {"code": "zh-hans", "is-active": "true", "name": "简体中文"}, {"code": "en", "is-active": "false", "name": "English"}, {"code": "ru", "is-active": "false", "name": "Русский"}, {"code": "oo", "is-active": "false", "name": "O;o,"}]
# <!-- TOPIC
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:parent:intents": [{"url": "/intent/166001/", "title": "Computer errors"}]
"item:title": "Errors have resumable error codes"
"item:summary": "I was told how to get the Nth product on Stackoverflow, he also told me how to get the product number from a product! Which you must understand how useful that is. Error messages can be completely retried and resumed with this information. I only need to log or print out a special error code and the user can retry from where they left off!"
"item:voting": 0
"item:voting:add": "/admin/hlog/voting/add/?method=152001"
"item:voting:csrf_token": "kpEbmFupyb3m4GjZ051W8HineAxei6YzjYqZnwAOUl9ZnnTaQzG3tuBQSAzaw4Nd"
"item:voting:submit-value-option": {"selected": "[-]", "value": "-"}
"item:base-administration": false
"item:body": |
    Assuming you have a nested loop,
    
    ```
    for letter in letters:
     for number in numbers:
      for symbol in symbols:
       print(letter + number + symbol)
    ```
    
    If the code fails halfway through, you print out ERROR-letter-number-symbol. Then you use the following function to calculate the Nth position in the product list:
    
    [Link to the stackoverflow](https://stackoverflow.com/questions/72882207/whats-the-mathematical-formula-for-a-nested-loop)
    
    ```
    def position(list_of_lists, tup):
        t = 1
        res = 0
        for lst, x in zip(reversed(list_of_lists), reversed(tup)):
            res += t * lst.index(x)
            t *= len(lst)
        return res
    ```
    
    From this point we can resume the loop!
"item:source-date": ""
"item:permalink": "/method/152001/?l=cn"
"item:owner": "chronological"
"item:created": "2022-07-11T13:06:51.507390"
"item:ownerlink": "/user/198/chronological"
# <!-- LINKS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:link:add": "/admin/hlog/link/add/?parent=152001"
"item:link:items":
"item:project:items":

# <!-- COMMENTS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:comment:items":
"base:js": "/static/js/base.c7357c06cc89.js"
