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
- (void)layoutSubviews { | |
[super layoutSubviews]; | |
float indentPoints = self.indentationLevel * self.indentationWidth; | |
if (indentPoints > 0) { | |
[self.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { | |
UIView *view = (UIView *)obj; | |
CGFloat width = CGRectGetWidth(view.frame); | |
if (width > indentPoints * 2) | |
width -= indentPoints; | |
CGFloat x = CGRectGetMinX(view.frame); |
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 org.apache.commons.lang.StringUtils; | |
private String computeMD5(String string) throws NoSuchAlgorithmException { | |
byte[] stringBytes = string.getBytes(); | |
MessageDigest messageDigest = MessageDigest.getInstance("MD5"); | |
messageDigest.update(stringBytes, 0, stringBytes.length); | |
String md5 = new BigInteger(1, messageDigest.digest()).toString(16); | |
md5 = StringUtils.leftPad(md5, 32, '0'); |
NewerOlder