most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
Following is code for find all fonts from the system: | |
for(NSString *fontfamilyname in [UIFont familyNames]) | |
{ | |
NSLog(@"Family:'%@'",fontfamilyname); | |
for(NSString *fontName in [UIFont fontNamesForFamilyName:fontfamilyname]) | |
{ | |
NSLog(@"\tfont:'%@'",fontName); | |
} | |
NSLog(@"~~~~~~~~"); |
Step 1: Create Certificate .pem from Certificate .p12 | |
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12 | |
Step 2: Create Key .pem from Key .p12 | |
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12 | |
Step 3: Optional (If you want to remove pass phrase asked in second step) | |
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem | |
Step 4: Now we have to merge the Key .pem and Certificate .pem to get Development .pem needed for Push Notifications in Development Phase of App |
Typical Bit Mask Operations | |
Set a flag or overlay multiple values | |
flags | flagbitN | |
Unset a flag (zero-out a bit or set a bit to zero) | |
flags & ~flagbitN | |
Check if a bit is set | |
(flags & flagbitN) == flagbitN |
/* | |
You have to hijack the scrollView (Add yourself as a ScrollViewDelegate alongside TableViewDelegate) | |
and the table view will automatically forward scrollview events along side tableview events. | |
(self.tableView.delegate = self) is really talking to both | |
<UIScrollViewDelegate, UITableViewDelegate> | |
I have a helper function in the example that also calculates distance to the top of the cell. | |
*/ |
In Voice-Over , in order to make an element accessible :- | |
1. you have to set setIsAccessibilityElement property as true which i don't find in your code. | |
2; The other important point is that to make child elements (subviews) to be accessible , you have to seperately make them accessible while the parent should not be accessible(you have to specify this also). | |
Implement the UIAccessibilityContainer Protocol in your custom - cell. | |
NSString *title = titleofcell; | |
cell.accessibilityValue = title; | |
cell.accessibilityLabel = [NSString stringWithFormat:@"item %ld", (long)indexPath.row]; | |
cell.accessibilityTraits = UIAccessibilityTraitButton; |
// Option 1: In ViewController, set the cell instance to have accessibility. | |
Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:kCellID forIndexPath:indexPath]; | |
[cell setIsAccessibilityElement:YES]; | |
// Option 2: Implement the accessibility interface in the cell object: | |
// implementation file of Cusome CollectionViewCell | |
- (BOOL)isAccessibilityElement | |
{ | |
return YES; | |
} |
// Constants | |
#define APP_VERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] | |
#define APP_NAME [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] | |
#define APP_DELEGATE [[UIApplication sharedApplication] delegate] | |
#define USER_DEFAULTS [NSUserDefaults standardUserDefaults] | |
#define APPLICATION [UIApplication sharedApplication] | |
#define BUNDLE [NSBundle mainBundle] | |
#define MAIN_SCREEN [UIScreen mainScreen] | |
#define DOCUMENTS_DIR [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] |
import java.util.ArrayList; | |
public class SearchMe { | |
static int[] intArrayA = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; | |
static int[] intArrayB = {3,4,9,14}; | |
public static void main (String[] args) throws java.lang.Exception |