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
from flask.views import MethodView | |
class MethodView(MethodView): | |
_decorators = {} | |
def dispatch_request(self, *args, **kwargs): | |
"""Derived MethodView dispatch to allow for decorators to be | |
applied to specific individual request methods - in addition |
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
// Return the value of one offset bit in mask | |
function bit_query( mask, bit ) { | |
return ( ( mask & ( 1 << bit ) ) >> bit ); | |
} | |
// Return input mask with offset bit switched ON | |
function bit_on( mask, bit ) { | |
return ( mask | ( 1 << bit ) ); | |
} |