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
KHViewController *rootView = [[KHViewController alloc]initWithNibName:@"KHViewController" bundle:nil]; | |
UINavigationController *navigation = [[UINavigationController alloc]initWithRootViewController:rootView]; | |
self.window.rootViewController = navigation; |
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
$(function() { | |
/* variables */ | |
var status = $('.status'); | |
var percent = $('.percent'); | |
var bar = $('.bar'); | |
/* submit form with ajax request using jQuery.form plugin */ | |
$('form').ajaxForm({ | |
/* set data type json */ |
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
/*Los objetos*/ | |
ImageLoader imageLoader; | |
DisplayImageOptions options; | |
/*Iniciarlos*/ | |
imageLoader = ImageLoader.getInstance(); | |
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context) | |
.build(); | |
imageLoader.init(config); |
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
#include <18F4520.h> | |
#device adc = 10 | |
#fuses XT, PUT, NODEBUG , NOBROWNOUT , NOPROTECT , NOLVP | |
#use delay(clock=4000000) | |
#use rs232(baud=9600, bits = 8 , parity = N ,xmit=PIN_C6,rcv=PIN_C7) | |
#include <ds1307.c> | |
float temperatura;//Variable que almacenara la temperatura; | |
boolean timerFired=false;//bandera para disparar el timer |
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
#include <18f4520.h> | |
#fuses XT, NOWDT, PUT, NODEBUG, NOBROWNOUT, NOPROTECT, NOLVP, NOWRT | |
#use delay(clock=4000000) | |
#include<ds1307.c> | |
#use rs232(baud=9600, bits = 8 , parity = N ,xmit=PIN_C6,rcv=PIN_C7) | |
int ch; | |
int timer=0; | |
int segundos=0; | |
int minutos=0; |
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
/************************************************/ | |
/*PIN_B0 FOCO 1 */ | |
/*PIN_B1 FOCO 2 */ | |
/*PIN_B2 SENSADO FOCO 1 */ | |
/*PIN_B3 SENSADO FOCO 2 */ | |
/*PIN_B4 VENTANA 1 */ | |
/*PIN_B5 VENTANA 2 */ | |
/*PIN_B6 PUERTA 1 */ | |
/*PIN_B6 PUERTA 2 */ | |
/************************************************/ |
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
@picture = params[:picture] #form data | |
directory = "photos" #path destination | |
path = File.join(directory,@picture.original_filename) #join the name "pathdestination/filename.extension" | |
File.open(path, "wb") { |f| f.write(@picture.read) } #save the file | |
redirect_to root_path |
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
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
before_filter :configure_permitted_parameters, if: :devise_controller? | |
protected | |
def configure_permitted_parameters | |
devise_parameter_sanitizer.for(:sign_up) << :username |