
next
NSData *imageData = UIImagePNGRepresentation(image);
I just sent you "Jackie" in Japanese.
You can view it by clicking here:
http://...
r = s[::-1].replace("l", "r")
+ (NSString *)stringReversedFromString:(NSString *)s {
NSMutableString *reversed = [NSMutableString stringWithString:@""];
NSUInteger len = [s length];
for (int i = len - 1; i >= 0; i--) {
unichar ch = [s characterAtIndex:i];
NSString *charStr = [NSString stringWithFormat:@"%C", ch];
[reversed appendString:charStr];
}
return reversed;
}
...
NSMutableString *r = [[self stringReversedFromString:s] mutableCopy];
NSRange replaceRange = NSMakeRange(0, [r length]);
[r replaceOccurrencesOfString:@"l" withString:@"r" options:NSCaseInsensitiveSearch range:replaceRange];
#!/bin/bash
mkdir ../icons 2>/dev/null
cp 29x29.png ../icons/Icon-Small.png
cp 50x50.png ../icons/Icon-Small-50.png
cp 57x57.png ../icons/Icon.png
cp 58x58.png ../icons/Icon-Small@2x.png
cp 72x72.png ../icons/Icon-72.png
cp 114x114.png ../icons/Icon@2x.png
cp 512x512.png ../icons
ls -l ../icons
echo "Now add all these ../icons to the project, except upload 512x512.png later by hand to itunes connect."
dom = xml.dom.minidom.parse("some_svg_file.svg")
coords = []
for rect in dom.documentElement.getElementsByTagName("rect"):
attr = rect.getAttribute
coords.append([attr("x"), attr("y")])
print coords
<svg width="1280" height="960" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<g>
<image xlink:href="http://localhost:8896/static/A.png" id="svg_1" height="960" width="1280" y="0" x="0"/>
</g>
</svg>
{"test" : "yeah"}
- (void) jsonTest {
SBJsonParser *parser = [SBJsonParser new];
NSString *fullPath = [[NSBundle mainBundle] pathForResource:@"katakana" ofType:@"json"];
NSString *jsonString = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:nil];
NSDictionary *dict = [parser objectWithString:jsonString];
if (dict) {
NSString *out = [dict objectForKey:@"test"];
NSLog(out);
} else {
NSLog(@"Could not parse JSON.");
}
}