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
class Order(object): | |
def __init__(self, order_id, sku_id_s): | |
self.order_id = order_id | |
self.sku_id_s = sku_id_s | |
def __repr__(self): | |
return repr(self.order_id) | |
class OrderGroup(object): | |
def __init__(self): | |
self.head_group = self |
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
# user (0x130, 0x128) | |
# [0, 8) name_p (size <= 0x1000) | |
# [8, 0x10) age | |
# [0x10, 0x110) description | |
# [0x110, 0x118) link_message_head | |
# [0x118, 0x120) friend | |
# [0x120, 0x128) valid or not | |
# message (0x20, 0x18) | |
# [0, 8) title_p (string_size+1 <= 0x1000) |
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
html { | |
-webkit-user-select: none; | |
user-select: none; | |
height: 100%; | |
width: 100%; | |
} | |
body { | |
-webkit-user-select: none; | |
user-select: none; | |
width: 100%; |
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
Available keys for -exportOptionsPlist: | |
compileBitcode : Bool | |
For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES. | |
embedOnDemandResourcesAssetPacksInBundle : Bool | |
For non-App Store exports, if the app uses On Demand Resources and this is YES, asset packs are embedded in the app bundle so that the app can be tested without a server to host asset packs. Defaults to YES unless onDemandResourcesAssetPacksBaseURL is specified. |
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
@interface FMDatabase (AutoRollback) | |
@end | |
@implementation FMDatabase (AutoRollback) | |
- (NSError*)inAutoRollbackSavePoint:(NSError* (^)())block | |
{ |
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
#import <Foundation/Foundation.h> | |
@interface NSThread (RunBlock) | |
- (void)performBlock:(void(^)())block; | |
- (void)performBlock:(void (^)())block afterDelay:(NSTimeInterval)delay; | |
@end |
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
#include <memory> | |
#include <type_traits> | |
#include <boost/preprocessor/repetition.hpp> | |
#include <boost/preprocessor/arithmetic/add.hpp> | |
#include <boost/preprocessor/comparison/greater.hpp> | |
namespace base | |
{ | |
#define _MAKE_UNIQUE_PARAM_TYPENAME(z, n, data) typename ParamT##n | |
#define _MAKE_UNIQUE_PARAM_DECLARE(z, n, data) ParamT##n&& param##n |
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
// usage: | |
// auto _ = make_unqiue<string>("foobar"); | |
// auto _ = make_unique<string[]>(2); | |
#include <memory> | |
#include <type_traits> | |
namespace base | |
{ | |
template<typename T, typename... ParamT> |