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
| /* Tutorial 2 | |
| * Presionamos un boton para encender un LED, | |
| * lo volvemos a presionar para apagarlo | |
| */ | |
| int estado=0; //Guarda estado del botón | |
| int estadoAnterior=0; //Guardar el estado anterior del botón | |
| int salida=0; //0= Led Apagado / 1=Led Encendido | |
| void setup() { |
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
| <% art_name ||= @article.title %> | |
| <h1><%= name %> Artículo <%= art_name %></h1> | |
| <%=simple_form_for @article, html: {multipart: true} do |f| %> | |
| <% @article.errors.full_messages.each do |message|%> | |
| <div class="be-red white top-space"> | |
| * <%= message %> | |
| </div> | |
| <% end %> | |
| <div class="field"> |
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
| <h1><%= name %> Venta </h1> | |
| <div class="well"> | |
| <%= simple_form_for @vent do |f| %> | |
| <%= f.input :empleado_id, as: :hidden, input_html: {value: current_empleado.id}%> | |
| <%=f.input :fecha, { :discard_day => true, :discard_month => true, :discard_year => true } %> | |
| <%= f.simple_fields_for :productos_vents do |p| %> | |
| <div> | |
| <%= render 'producto', :f=>p %> | |
| </div> |