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
public static boolean isDark(Bitmap bitmap){ | |
boolean dark=false; | |
float darkThreshold = bitmap.getWidth()*bitmap.getHeight()*0.45f; | |
int darkPixels=0; | |
int[] pixels = new int[bitmap.getWidth()*bitmap.getHeight()]; | |
bitmap.getPixels(pixels,0,bitmap.getWidth(),0,0,bitmap.getWidth(),bitmap.getHeight()); | |
for(int pixel : pixels){ |
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
fixtint(){ | |
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/DMProxy | |
} |
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
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/DMProxy |
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 "HelloWorldAppDelegate.h" | |
@implementation HelloWorldAppDelegate | |
@synthesize window; | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
NSLog(@"Hello!"); | |
[window makeKeyAndVisible]; | |
} |
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 "HelloWorldAppDelegate.h" | |
@implementation HelloWorldAppDelegate | |
@synthesize window; | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
// Override point for customization after application launch | |
[window makeKeyAndVisible]; |
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
- (NSArray *) dates:(int) inYear | |
{ | |
NSCalendar *calendar = [NSCalendar currentCalendar]; | |
NSMutableArray* result = [[NSMutableArray alloc]init]; | |
NSDate* startDate; | |
NSDateComponents* comps = [[NSDateComponents alloc] init]; | |
[comps setDay:1]; | |
[comps setMonth:1]; | |
[comps setYear:inYear]; |
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
parms= "doaction=patron-login&data=dest%3DXWW%2Fpub%2Fpatronstatus.html+doaction%3D+data%3D+group%3Dpub+tickno%3DLÅNENUMMBER+pin%3PINKODE" | |
h = Net::HTTP.new("stormp.kk.dk",443) | |
h.use_ssl = true | |
res = h.post("/sites/XWW/pub/patronstatus.html",parms).body.gsub("\r","").gsub("\n","") | |