This file contains 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
// | |
// ViewController.m | |
// sale | |
// | |
// Created by Edgar Garcia on 2/21/12. | |
// Copyright (c) 2012 E. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains 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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.title = @"Root view"; | |
UIButton *backImage = [UIButton buttonWithType:UIButtonTypeCustom]; | |
backImage.frame = CGRectMake(0, 0, 24, 24); | |
backImage.backgroundColor = [UIColor clearColor]; | |
[backImage setBackgroundImage:[UIImage imageNamed:@"back.png"] forState:UIControlStateNormal]; | |
[backImage addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchDown]; |
This file contains 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 *gradientImage44 = [[UIImage imageNamed:@"nav44"] | |
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; | |
UIImage *gradientImage32 = [[UIImage imageNamed:@"nav32"] | |
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; | |
[[UINavigationBar appearance] setBackgroundImage:gradientImage44 | |
forBarMetrics:UIBarMetricsDefault]; | |
[[UINavigationBar appearance] setBackgroundImage:gradientImage32 | |
forBarMetrics:UIBarMetricsLandscapePhone]; | |
This file contains 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
[my_image spinImageWithTime:2 direction:1]; | |
[my_button spinButtonWithTime:4 direction:-1]; |
This file contains 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
<?php | |
## script delete rows postmeta | |
## version: 0.1 | |
## author: Edgar G (hunk) ing.edgar@gmail.com | |
## this script delete rows duplicate in postmeta for the meta_key _mf_write_panel_id | |
## magicfields.org hunk.com.mx | |
include('wp-config.php'); | |
include('wp-load.php'); |
This file contains 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
<?php | |
function get_group($name_group,$post_id=NULL,$add_params = NULL){ | |
global $wpdb, $post, $FIELD_TYPES; | |
if(!$post_id){ $post_id = $post->ID; } | |
$cache_name = $post_id.'/_groups-'. sanitize_title_with_dashes( $name_group ).'.txt'; | |
if( !$data_groups = unserialize( MF_get_cached_data( $cache_name, FALSE ) ) ) { | |
$sql = "SELECT pm.field_name, cf.type, pm_wp.meta_value, pm.order_id, pm.field_count, cf.id, fp.properties |
This file contains 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)viewDidLoad{ | |
[super viewDidLoad]; | |
if ([MFMailComposeViewController canSendMail]) { | |
myButton.enabled = YES; | |
} | |
} | |
- (IBAction)buttonPressed{ | |
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init]; | |
mailController.mailComposeDelegate = self; |
This file contains 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
// MailTestViewController.h | |
#import <UIKit/UIKit.h> | |
#import <MessageUI/MessageUI.h> | |
@interface MailTestViewController : UIViewController <MFMailComposeViewControllerDelegate>{ | |
IBOutlet UIButton *myButton; | |
} | |
- (IBAction)buttonPressed; |
This file contains 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
;;bindings | |
(global-set-key (kbd "<f1>") 'start-kbd-macro) | |
(global-set-key (kbd "<f2>") 'nxhtml-mumamo-mode) | |
(global-set-key (kbd "<f3>") 'php-mode) | |
(global-set-key (kbd "<f4>") 'indent-region) | |
(global-set-key (kbd "<f5>") 'enlarge-window) | |
(global-set-key (kbd "<f6>") 'shrink-window) | |
(global-set-key (kbd "<f7>") 'enlarge-window-horizontally) | |
(global-set-key (kbd "<f8>") 'shrink-window-horizontally) | |
(global-set-key (kbd "<f9>") 'comment-region) |
This file contains 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
<?php | |
function FilterPostsPagesListJoin($join){ | |
global $wpdb; | |
if (isset($_GET['filter-posts'])) { | |
$join = " JOIN $wpdb->postmeta ON wp_postmeta.post_id = wp_posts.ID "; | |
} | |
return $join; | |
} | |
?> |