This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void recursiveLoopChildren(ViewGroup parent) { | |
| for (int i = parent.getChildCount() - 1; i >= 0; i--) { | |
| final View child = parent.getChildAt(i); | |
| if (child instanceof ViewGroup) { | |
| recursiveLoopChildren((ViewGroup) child); | |
| // DO SOMETHING WITH VIEWGROUP, AFTER CHILDREN HAS BEEN LOOPED | |
| } else { | |
| if (child != null) { | |
| // DO SOMETHING WITH VIEW | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i,value in enumerate(numbers): | |
| quotient = num/value | |
| for once in xrange(quotient): | |
| if res == '': | |
| res = letters[i] | |
| else: | |
| res = res + letters[i] | |
| num = num%value | |
| return res |