Skip to content

Instantly share code, notes, and snippets.

var mes = new TObs()
{
messageid = Guid.NewGuid().ToString(),
source = this.SourceName,
status = "OK",
};
var options = MessagePack.MessagePackSerializerOptions.Standard.WithResolver(MessagePack.Resolvers.StandardResolverAllowPrivate.Instance);
var jsonString = MessagePack.MessagePackSerializer.ConvertToJson(MessagePack.MessagePackSerializer.Serialize<TObs>(mes, options));
[MessagePack.MessagePackObject(true)]
private class TObs
{
public string error { get; set; }
[MessagePack.Key("message-id")]
public string messageid { get; set; }
public string status { get; set; }
}
[MessagePack.MessagePackObject()]
private class TObs
{
[MessagePack.Key("error")]
public string error { get; set; }
[MessagePack.Key("message-id")]
public string messageid { get; set; }
[MessagePack.Key("status")]
public string status { get; set; }
}
#include <M5Core2.h>
void setup() {
M5.begin(true, false, true);
Serial.begin(115200);
M5.Lcd.setTextSize(2);
M5.Lcd.setTextColor(0xFFFF);
}
void loop() {
#include "Adafruit_Sensor.h"
#include <Adafruit_BMP280.h>
#include <M5Core2.h>
#include <Wire.h>
Adafruit_BMP280 Bmp; // I2C
float Pressure = 0.0;
void setup() {
M5.begin();
#include "Adafruit_Sensor.h"
#include <Adafruit_BMP280.h>
#include <M5Core2.h>
#include <Wire.h>
#include "SHT3X.h"
SHT3X Sht30; // I2C
Adafruit_BMP280 Bmp; // I2C
float Tmp = 0.0;
float Hum = 0.0;
<Window x:Class="TextSummarizationSDKSample.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TextSummarizationSDKSample.Views"
DataContext="{Binding ViewModel, RelativeSource={RelativeSource Mode=Self}}"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
using UnityEngine;
using UnityEngine.EventSystems;
public class Interaction : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
private Rigidbody Body;
private bool IsRotate = false;
// Start is called before the first frame update
void Start()
using UnityEngine;
public class AirTapGesture : MonoBehaviour
{
[SerializeField] private Camera ArCamera;
private void Update()
{
if (Input.touchCount <= 0) return;