Skip to content

Instantly share code, notes, and snippets.

View fernandolopes's full-sized avatar

FERNANDO LOPES DA SILVA fernandolopes

View GitHub Profile
@fernandolopes
fernandolopes / telefone.m
Created July 2, 2013 23:27
filtro de telefone
- (BOOL) textField: (UITextField *)theTextField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string {
if(self.telefone1 == activeTextField || self.telefone2 == activeTextField){
if ([string length] == 0 && range.length > 0){
activeTextField.text = @"";
}
else{
if(theTextField.text.length==2){
NSString *s = @"(";
#ifdef _SYSTEMCONFIGURATION_H
typedef enum {
AFNetworkReachabilityStatusUnknown = -1,
AFNetworkReachabilityStatusNotReachable = 0,
AFNetworkReachabilityStatusReachableViaWWAN = 1,
AFNetworkReachabilityStatusReachableViaWiFi = 2,
} AFNetworkReachabilityStatus;
#else
#pragma message("SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available.")
#endif
/*
Navicat Premium Data Transfer
Source Server : Quero Sorvete
Source Server Type : MySQL
Source Server Version : 50531
Source Host : localhost
Source Database : querecom_quero_sorvete
Target Server Type : MySQL
CREATE TABLE `produtos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(60) DEFAULT NULL,
`description` varchar(60) NOT NULL,
`price` double DEFAULT '0',
`selectedQuantity` int(11) DEFAULT NULL,
`pedido_id` int(11) DEFAULT NULL,
`selectedFlavors` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `pedido_id` (`pedido_id`),
<?php
require_once 'PHPMailer_v5.1/class.phpmailer.php';
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SetFrom('[email protected]', 'Seu nome');
$mail->AddAddress("[email protected]", "nome do destinatário");
$mail->Subject = "Título do email";
$mail->AltBody = "Texto alternativo";
Options FollowSymLinks
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /multicredmais/
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
#import <UIKit/UIKit.h>
@interface PlayerCell : UITableViewCell
@property (nonatomic, strong) IBOutlet UILabel *nameLabel;
@property (nonatomic, strong) IBOutlet UILabel *gameLabel;
@property (nonatomic, strong) IBOutlet UIImageView
*ratingImageView;
@end
@fernandolopes
fernandolopes / gist:4161149
Created November 28, 2012 13:05
get_receiving_logs_for_creation
select distinct `receiving_logs`.`id` AS `id`,`receiving_logs`.`lot` AS `lot`,`receiving_logs`.`quantity` AS `quantity`,`receiving_logs`.`date` AS `date`,`receiving_logs`.`status` AS `status`,`products`.`description` AS `product_description`,`products`.`best_buy_date` AS `best_buy_date`,`products`.`weight` AS `weight`,`products`.`aflatoxin` AS `aflatoxin`,`products`.`free_fatty_acid` AS `free_fatty_acid`,`products`.`moisture` AS `moisture`,`products`.`peanut_protein` AS `peanut_protein`,`products`.`decay` AS `decay`,`products`.`breakage` AS `breakage`,`products`.`foreign_material` AS `foreign_material`,`products`.`insects_damage` AS `insects_damage`,`products`.`kernels_with_skin` AS `kernels_with_skin`,`products`.`lower_grade` AS `lower_grade`,`products`.`roaster_test` AS `roaster_test`,`products`.`salmonella_negative` AS `salmonella_negative`,`products`.`mold` AS `mold`,`products`.`color` AS `color`,`products`.`flavor` AS `flavor`,`products`.`odor` AS `odor`,`products`.`texture` AS `texture`,`products`.`sizi
<?php if (!$employee->level == 1) { ?>
function verifica_comments_acceptance() {
var result = true;
$('.select_comments option:selected').each(function(index){
if($(this).val() == 0) {
result = false
}
@fernandolopes
fernandolopes / gist:4071672
Created November 14, 2012 11:40
correção
function __construct() {
parent::__construct();
MY_Controller::$language = 'brazilian';
// Salva informação do idioma na sessão.
$dados_sessao['idioma_site'] = MY_Controller::$language;
$this->config->set_item('language', MY_Controller::$language);
// Salva informações da sessão.