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
| String serverURL = "SERVER_URL" | |
| DefaultHttpClient hc=new DefaultHttpClient(); | |
| ResponseHandler <String> res=new BasicResponseHandler(); | |
| HttpPost postMethod=new HttpPost(serverURL); | |
| List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(N); | |
| nameValuePairs.add(new BasicNameValuePair("param1_name", param1_value)); | |
| nameValuePairs.add(new BasicNameValuePair("param2_name", param2_value)); | |
| * | |
| * |
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
| #!/bin/sh | |
| # build.sh | |
| GLOBAL_OUTDIR="`pwd`/dependencies" | |
| LOCAL_OUTDIR="./outdir" | |
| LEPTON_LIB="`pwd`/leptonica-1.68" | |
| TESSERACT_LIB="`pwd`/tesseract-3.01" | |
| IOS_BASE_SDK="5.1" | |
| IOS_DEPLOY_TGT="4.3" |
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
| #!/bin/sh | |
| # build.sh | |
| GLOBAL_OUTDIR="`pwd`/dependencies" | |
| LOCAL_OUTDIR="./outdir" | |
| LEPTON_LIB="`pwd`/leptonica-1.69" | |
| TESSERACT_LIB="`pwd`/tesseract-r775" | |
| IOS_BASE_SDK="6.0" | |
| IOS_DEPLOY_TGT="4.3" |
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
| //The user won't be prompted to call | |
| //That means that the dial app will be launched automatically | |
| -(IBAction)makeCallWithoutPromt:(NSString *)tel( | |
| NSString *phoneNumber = [NSString stringWithFormat: @"tel://%@",tel]; | |
| [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]]; | |
| ) | |
| //The user will be prompted to call | |
| //That means that the dial app will be launched after the user clicked on OK when prompted |
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
| -(UIImage *)cropImage:(UIImage *)image{ | |
| // Defining the rectangle we want to crop | |
| CGRect newSize = CGRectMake(0.0, 50.0, 320.0, 430.0); | |
| // Create a new image with new size and original image : Some Quartz code | |
| CGImageRef tmp = CGImageCreateWithImageInRect([image CGImage], newSize); | |
| // Get back to our UIImage class | |
| UIImage *croppedImage = [UIImage imageWithCGImage:tmp]; |
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)adjustLabelHeight:(UILabel * )label string :(NSString *)string{ | |
| //Calculate the expected size based on the font and linebreak mode of your label | |
| CGSize maximumLabelSize = CGSizeMake(label.frame.size.width,9999); | |
| CGSize expectedLabelSize = [string sizeWithFont:label.font constrainedToSize:maximumLabelSize lineBreakMode:label.lineBreakMode]; | |
| //adjust the label the the new height. | |
| CGRect newFrame = label.frame; | |
| newFrame.size.height = expectedLabelSize.height; | |
| label.frame = newFrame; |
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
| -(BOOL)checkString:(NSString *)originalString contains :(NSString *)subString{ | |
| BOOL found = NO; | |
| if ([originalString rangeOfString:subString].location != NSNotFound) { | |
| found = YES; | |
| } | |
| return found; | |
| } |
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
| //first raw | |
| NSMutableDictionary * dico10 = [NSMutableDictionary dictionaryWithCapacity:2]; | |
| [dico10 setObject:@"image0.png" forKey:@"image"]; | |
| [dico10 setObject:@"Mise à niveau du contrôle routier" forKey:@"titre"]; | |
| [dico10 setObject:@"Le nouveau Code recourt aux nouvelles technologies pour le contrôle routier. Radars fixes, radars mobiles, alcootests, stations de pesage automatique…, autant de moyens pour réduire significativement l’intervention de l’élément humain, le pouvoir discrétionnaire des agents et garantir la transparence du contrôle." forKey:@"text"]; | |
| NSMutableDictionary * dico11 = [NSMutableDictionary dictionaryWithCapacity:2]; | |
| [dico11 setObject:@"image1.png" forKey:@"image"]; | |
| [dico11 setObject:@"Responsabilités et peines privatives" forKey:@"titre"]; | |
| [dico11 setObject:@"Les sanctions privatives de liberté visent à punir les usagers enfreignant délibérément les règles de la circulation et commettant des accidents d’une extrême gravité (délits d’homicide ou de blessure |
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 Versioning Preprocessor Macros | |
| */ | |
| #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
| #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
| #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
| #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
| #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
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
| [ | |
| { | |
| "uid": "0", | |
| "login": "", | |
| "pass": "", | |
| "nom_prenom": null | |
| }, | |
| { | |
| "uid": "1", | |
| "login": "admin", |
OlderNewer