Skip to content

Instantly share code, notes, and snippets.

View lingmujianshi's full-sized avatar

lmjs lingmujianshi

View GitHub Profile
#! /usr/bin/env python
# coding: utf-8
import os
from mutagen.easyid3 import EasyID3
import jaconv
# フォルダ名(スクリプトがある場所に処理するフォルダを作成した。)
dirname=u'./瞬間英作文シャッフル2'
files = os.listdir(dirname)
#ifndef UDPCLIENT_HPP
#define UDPCLIENT_HPP
#define ASIO_STANDALONE
#include <asio.hpp>
class UDPClient
{
private:
asio::ip::udp::endpoint endpoint;
#include <iostream>
#include <iomanip>
#define ASIO_STANDALONE
#include <asio.hpp>
#pragma pack(push,1)
//送信コマンドヘッダ
struct QNa3E_Frame_Send{
#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')
@lingmujianshi
lingmujianshi / c_cpp_properties.json
Last active April 13, 2019 06:00
vscode win setting
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
#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;
#include <IRremote.h>
IRsend irsend(26);
void setup()
{
}
void loop() {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12);
delay(40);
}
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");
#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 November 2, 2018 14:46
スプレッドシートを使って翻訳
//Webページからデータを受けてスプレッドシートへ
function trans(data) {
var csv = data;
var array = toArray(csv);
writeToSheet(array);
}
//スプレッドシートへ書き込み
function writeToSheet(data) {
sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();