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 <SoftwareSerial.h> | |
SoftwareSerial SIM(8, 9); | |
int8_t answer; | |
int onModulePin = 2; | |
char aux_str[50]; | |
char ip_data[40] = "Test string from GPRS shieldrn"; | |
void setup() { | |
pinMode(onModulePin, OUTPUT); | |
SIM.begin(9600); |
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
public class Primary | |
{ | |
public int Id { get; set; } | |
public string Label { get; set; } | |
public int Flag { get; set; } | |
public DateTime Timestamp{ get; set; } | |
} |
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
// GetSelectedIndices | |
foreach (int i in ListBox1.GetSelectedIndices()) | |
{ | |
// ListBox1.Items[i] ... | |
} | |
// Items collection | |
foreach (ListItem item in ListBox1.Items) | |
{ | |
if (item.Selected) |
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
SELECT | |
UID, COUNT(Timestamp), Timestamp, GROUP_CONCAT(id) | |
FROM | |
Transactions | |
GROUP BY | |
UID,Timestamp | |
HAVING | |
COUNT(Timestamp) > 1; |
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
public class ZScoreOutput | |
{ | |
public List<double> input; | |
public List<int> signals; | |
public List<double> avgFilter; | |
public List<double> filtered_stddev; | |
} | |
public static class ZScore | |
{ |
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
using System; | |
using System.Globalization; | |
public class NmeaInterpreter | |
{ | |
// Represents the EN-US culture, used for numers in NMEA sentences | |
public static CultureInfo NmeaCultureInfo = new CultureInfo("en-US"); | |
// Used to convert knots into miles per hour | |
public static double MPHPerKnot = double.Parse("1.150779", | |
NmeaCultureInfo); |
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
uint8_t b[]= { 0xE0, 0x10, 0x82, 0x00, 0x01, 0xE2, 0x00, 0x00, 0x19, | |
0x10, 0x10, 0x01, 0x05, 0x18, 0x30, 0x49, | |
0xD8, 0x03 }; | |
int i; | |
void printHex(uint8_t num) { | |
char hexCar[2]; | |
sprintf(hexCar, "%02X", num); | |
Serial.print(hexCar); |
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
int d1 = 2; | |
int d2 = 3; | |
byte data[3] = {}; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { |
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 <EEPROM.h> | |
uint8_t rx_buffer[10]; | |
uint8_t rx_mem[10]; | |
void setup() { | |
Serial.begin(115200); | |
loadStruct(&rx_mem, sizeof(rx_mem)); // Load data from EEPROM into array. | |
} |
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
JObject jObjectbody = new JObject(); | |
jObjectbody.Add("label", item.PlateNo); | |
jObjectbody.Add("asset", item.AssetCode); | |
jObjectbody.Add("rfid", item.RFID); | |
var baseAddress = $"http://xx.xx.xx.xx/casper/api/FCS/SecondaryTag?key={userModel.Session}"; | |
var http = (HttpWebRequest)WebRequest.Create(new Uri(baseAddress)); | |
http.Accept = "application/json"; | |
http.ContentType = "application/json"; |