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 UIKit | |
extension UIImage { | |
func base64EncodingString() -> String { | |
let imageData:Data = UIImagePNGRepresentation(self)! | |
return imageData.base64EncodedString() | |
} | |
} |
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 <map> | |
// | |
// @param number : Of which you want the prime factorization. | |
// @param freq : Where to store the prime factorization result. | |
// | |
void primeFactorization(unsigned long long number, std::map<int, int> &freq) | |
{ | |
// initially divide via 2 | |
// it has a special thing like |
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
// | |
// UICollectionView+Highlight.h | |
// | |
// Created by Ratul Sharker on 9/18/17. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UICollectionView (Highlight) |
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> | |
// | |
// HISTORY... | |
// | |
// from ios 10 simillar functionality is given which is initialized | |
// with a block, but we need to support the older version too, | |
// thats why this class is been introduced | |
// |
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 UDPEchoClient : NSObject | |
- (BOOL) sendData:(const char *)msg; | |
@end |
NewerOlder