Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
NSString *phNo = @"+919876543210"; | |
NSURL *phoneUrl = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt:%@",phNo]]; // ok tel: | |
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) { | |
[[UIApplication sharedApplication] openURL:phoneUrl]; | |
} else { | |
calert = [[UIAlertView alloc]initWithTitle:@"Alert" message:@"Call facility is not available!!!" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil, nil]; | |
[calert show]; | |
} |
if ([CLLocationManager locationServicesEnabled]) { | |
NSLog(@"Servicio de localización habilitado."); | |
if([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) { | |
NSLog(@"Servicio de localización habilitado sin permiso de uso."); | |
} else { | |
NSLog(@"Servicio de localización habilitado con permiso de uso."); | |
} | |
} else { | |
NSLog(@"Servicio de localización deshabilitado."); | |
} |
From android 4.1 / 4.2, the following Roboto font families are available: | |
android:fontFamily="sans-serif" // roboto regular | |
android:fontFamily="sans-serif-light" // roboto light | |
android:fontFamily="sans-serif-condensed" // roboto condensed | |
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2) | |
in combination with | |
android:textStyle="normal|bold|italic" |
-(NSString *)getImgUrl:(NSString *)inputString{ | |
NSString *url = nil; | |
NSScanner *theScanner = [NSScanner scannerWithString:inputString]; | |
// find start of IMG tag | |
[theScanner scanUpToString:@"<img " intoString:nil]; | |
if (![theScanner isAtEnd]) { | |
[theScanner scanUpToString:@"src" intoString:nil]; | |
NSCharacterSet *charset = [NSCharacterSet characterSetWithCharactersInString:@"\"'"]; | |
[theScanner scanUpToCharactersFromSet:charset intoString:nil]; | |
[theScanner scanCharactersFromSet:charset intoString:nil]; |
// | |
// VistaPrincipalViewController.m | |
// Proyecto2 | |
// | |
// Created by Fabiola Ramirez on 29/06/14. | |
// Copyright (c) 2014 Fabiola Ramirez. All rights reserved. | |
// | |
#import "VistaPrincipalViewController.h" | |
#import "Annotation.h" |
// | |
// VistaPrincipalViewController.m | |
// Proyecto2 | |
// | |
// Created by Fabiola Ramirez on 29/06/14. | |
// Copyright (c) 2014 Fabiola Ramirez. All rights reserved. | |
// | |
#import "VistaPrincipalViewController.h" | |
#import "Annotation.h" |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
public class Main { | |
public static void main(String[] args) { | |
System.out.print("Hello Gist!"); | |
} | |
} |
label.text = @"some text"; | |
[label sizeToFit]; |
NSError *error = nil; | |
id jsonObject = [NSJSONSerialization | |
JSONObjectWithData:[string dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:&error]; | |
if (jsonObject != nil && error == nil) { | |
NSLog(@"Successfully deserialized..."); | |
if ([jsonObject isKindOfClass:[NSDictionary class]]) { | |
NSDictionary *deserializedDictionary = (NSDictionary *)jsonObject; | |
NSLog(@"Deserialized JSON Dictionary = %@", deserializedDictionary); | |
} else if ([jsonObject isKindOfClass:[NSArray class]]) { |