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)activeSensorProximity{ | |
UIDevice *device = [UIDevice currentDevice]; | |
if ([self hasProximitySensor]) { | |
[device setProximityMonitoringEnabled:YES]; | |
NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; | |
[center addObserver:self | |
selector:@selector(proximitySensorDidChange:) |
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
#pragma mark - KVO Config | |
+(NSArray *)observerArray{ | |
NSArray *keys = @[@"date", @"title", @"showedWord"]; | |
return keys; | |
} | |
-(void)setupKVO{ | |
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
/** | |
* Created by ivancuxaro on 28/4/16. | |
* in app.js put | |
* app.use('/admin', require('./routes/admin')); | |
*/ | |
var express = require('express'); | |
var router = express.Router(); | |
router.get('/', function (req, res) { |
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
#poner chmod +x NombreArchivo | |
#Ejecutar con ./NombreArchivo | |
bin/mongod --dbpath ./data/db --directoryperdb |
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
<?php | |
add_action('genesis_pre_get_option_site_layout', 'ib_cambiar_layout'); | |
function ib_cambiar_layout($opt){ | |
if (is_home() || is_front_page() || is_archive() || is_category() || in_category() || is_single() || is_single('slug') || is_page() || is_page('slug') || is_page(array('id', 'slug')) || is_page_tempalte('templates/about.php')){ | |
//$opt = 'content-sidebar'; | |
// $opt = 'sidebar-content'; | |
// $opt = 'content-sidebar-sidebar'; |
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
func resizeImage(image: UIImage, newWidth: CGFloat) -> UIImage { | |
let scale = newWidth / image.size.width | |
let newHeight = image.size.height * scale | |
UIGraphicsBeginImageContext(CGSize(width: newWidth, height: newHeight)) | |
image.draw(in: CGRect(x: 0, y: 0,width: newWidth, height: newHeight)) | |
let newImage = UIGraphicsGetImageFromCurrentImageContext() |
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
init() { | |
super.init(nibName: nil, bundle: nil) | |
let nib = UINib(nibName: "ListadoCell", bundle:Bundle.main) | |
tableView.register(nib, forCellReuseIdentifier: listadoCell.identifier) | |
} |
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
// MARK: - Array Extension | |
extension Array where Element: Equatable { | |
//Remove passing Element from Array | |
mutating func remove(object: Element) { | |
if let index = index(of: object) { | |
remove(at: index) | |
} | |
} |
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
//http://anexsoft.com/p/126/implementacion-de-json-web-token-con-php | |
<?php | |
namespace App\Lib; | |
use Firebase\JWT\JWT; | |
class Auth | |
{ | |
private static $secret_key = 'KEY_PRUEBA'; | |
private static $encrypt = ['HS256']; |
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
//Pagina de Settings API | |
if(!function_exists('mpp_settings_init')){ | |
function mpp_settings_init(){ | |
//Se puede registrar en: | |
// general | |
// ready | |
// media | |
// permalink |
OlderNewer