This file contains 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
class PaginatedRawQuerySet(RawQuerySet): | |
def __init__(self, raw_query, **kwargs): | |
super(PaginatedRawQuerySet, self).__init__(raw_query, **kwargs) | |
self.original_raw_query = raw_query | |
self._result_cache = None | |
def __getitem__(self, k): | |
""" | |
Retrieves an item or slice from the set of results. | |
""" |
This file contains 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
// convert a hexadecimal digit from 0 to f to its decimal counterpart | |
int hex_to_int(char hexChar) { | |
if (hexChar >= '0' && hexChar <= '9') { | |
return hexChar - '0'; | |
} else if (hexChar >= 'a' && hexChar <= 'f') { | |
return hexChar - 'a' + 10; | |
} | |
return -1; | |
} |
This file contains 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
/* J. Levin has compiled a bunch of Apple opensource utilites for arm64 | |
* You can get them from his site here: http://newosxbook.com/tools/iOSBinaries.html | |
* | |
* Follow the link to "The 64-bit tgz pack" | |
* | |
* Unpack the tarball into a directory called iosbinpack64 and drag-and-drop | |
* that directory into the directory with all the source files in in XCode | |
* so that it ends up in the .app bundle | |
* | |
* I (Elton) have added the ability to download files from your iPhone using your browser. |