Skip to content

Instantly share code, notes, and snippets.

Avatar

lmjs lingmujianshi

View GitHub Profile
View editId3.py
#! /usr/bin/env python
# coding: utf-8
import os
from mutagen.easyid3 import EasyID3
import jaconv
# フォルダ名(スクリプトがある場所に処理するフォルダを作成した。)
dirname=u'./瞬間英作文シャッフル2'
files = os.listdir(dirname)
View UDPClient.hpp
#ifndef UDPCLIENT_HPP
#define UDPCLIENT_HPP
#define ASIO_STANDALONE
#include <asio.hpp>
class UDPClient
{
private:
asio::ip::udp::endpoint endpoint;
View melsec_struct_test.cpp
#include <iostream>
#include <iomanip>
#define ASIO_STANDALONE
#include <asio.hpp>
#pragma pack(push,1)
//送信コマンドヘッダ
struct QNa3E_Frame_Send{
View melsec_test.cpp
#define ASIO_STANDALONE
#include <iostream>
#include <asio.hpp>
//16進数アスキーを数値に変換
char hex2char(char h)
{
if (h >= '0' && h <= '9')
return h - '0';
else if (h >= 'A' && h <= 'F')
View c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
View MatrixPrint.cpp
#include<iostream>
#include<iomanip>
using namespace std;
int main() {
cout << " 3 : " << bitset<32>(3) << endl;
cout << "~3 : " << bitset<32>(~3) << endl;
cout << "i & 3 の計算" << endl;
cout << "===========" << endl;
View リモコン送信SONYbyESP32.ino
#include <IRremote.h>
IRsend irsend(26);
void setup()
{
}
void loop() {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12);
delay(40);
}
View リモコン受信.ino
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
Serial.println("Enabling IRin");
irrecv.enableIRIn(); // Start the receiver
Serial.println("Enabled IRin");
View リモコン送信ESP32.ino
#include <IRremote.h>
IRsend irsend(26); //ピン番号26を指定
void setup()
{
}
void loop() {
unsigned int data = 0x41B6659A;
irsend.sendNEC(data, 32);
delay(5000); //5 second delay between each signal burst
}
@lingmujianshi
lingmujianshi / code.gs
Created Nov 2, 2018
スプレッドシートを使って翻訳
View code.gs
//Webページからデータを受けてスプレッドシートへ
function trans(data) {
var csv = data;
var array = toArray(csv);
writeToSheet(array);
}
//スプレッドシートへ書き込み
function writeToSheet(data) {
sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();