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
begin | |
HPCounter1.Start; | |
end; | |
procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); | |
//alto al conteo al soltar la tecla presionada | |
var | |
valor : string; | |
valor1 : integer; |
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
#include <EEPROM.h> | |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
#include <Wire.h> | |
#include <Adafruit_INA219.h> | |
const char* ssid = "Tu Wifi"; | |
const char* password = "tupassword"; | |
const char* mqtt_server = "tuservidor"; | |
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
import paho.mqtt.publish as publish | |
import time | |
print(“Enviando 0...") | |
publish.single("ledStatus", "0", hostname=“tuserver”) | |
time.sleep(3) | |
print(“Enviando 1...") | |
publish.single("ledStatus", "1", hostname=“tuserver”) |
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
// Asumamos que tenemos un objeto o, con propiedades a y b: | |
// {a: 1, b: 2} | |
// o.[[Prototype]] tiene las propiedades b y c: | |
// {b: 3, c: 4} | |
// Finalmente, o.[[Prototype]].[[Prototype]] es null. | |
// Así que la cadena de prototipos queda como | |
// {a:1, b:2} ---> {b:3, c:4} ---> null | |
console.log(o.a); // 1 | |
// Existe una propiedad 'a' en o? Sí, y su valor es 1. |
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
var o = { | |
a: 2, | |
m: function(b){ | |
return this.a + 1; | |
} | |
}; |
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
var o = { | |
a: 2, | |
m: function(b){ | |
return this.a + 1; | |
} | |
}; | |
console.log(o.m()); // 3 | |
// 'this' se refiere a 'o' cuya propiedad 'a' vale 2, | |
// así que m() regresa 3. |
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
class Point { | |
constructor(x, y) { | |
this.x = x; | |
this.y = y; | |
} | |
toString() { | |
return '(' + this.x + ', ' + this.y + ')'; | |
} | |
} | |
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
//Terminals | |
var cuantos = ToTerm("cuantos"); | |
var cuantas = ToTerm("cuantas"); | |
var cual = ToTerm("cual"); | |
var que = ToTerm("que"); | |
var cuando = ToTerm("cuando"); | |
var tiene = ToTerm("tiene"); | |
/* más aquí */ | |
var number = new NumberLiteral("number"); | |
var number2 = new NumberLiteral("number2"); |
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
import javax.microedition.midlet.MIDlet; | |
public class HolaMidlet extends MIDlet 4 | |
{ | |
public HolaMidlet (){} | |
public void startApp(){} | |
public void pauseApp(){} | |
public void destroyApp(boolean unconditional){} | |
} |
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
import javax.microedition.midlet.MIDlet; | |
import javax.microedition.lcdui.CommandListener; | |
import javax.microedition.lcdui.Display; | |
import javax.microedition.lcdui.Command; | |
import javax.microedition.lcdui.Displayable; | |
import javax.microedition.lcdui.TextBox; | |
public class HolaMidlet extends MIDlet implements CommandListener { | |
private Display display; | |
private Command cmdExit; |