Skip to content

Instantly share code, notes, and snippets.

@hideyukisaito
hideyukisaito / google_csharp_style_guide_ja.md
Last active July 3, 2024 03:18
C# at Google Style Guide 日本語訳

C# at Google Style Guide を日本語訳したものです。一部こなれていない箇所もあるので、お気づきの点があれば気軽にコメントでご指摘頂ければ幸いです。

C# at Google Style Guide 日本語訳

このスタイルガイドは Google 社内で開発された C# コード用であり、Google の C# コードのデフォルトのスタイルです。 Google C++ スタイルや Google Java スタイルなど、Google の他の言語に準拠した文体の選択を行います。

フォーマットについてのガイドライン

命名規則

@hideyukisaito
hideyukisaito / measurement.log
Created November 17, 2020 11:19
Server-side log for uploading test
node_1 | 2020-11-17T10:23:47.121754617Z <-- POST /api/measurements
node_1 | 2020-11-17T10:23:47.124198942Z STREAM 47: readableAddChunk <Buffer 31 00 00 00 04 32 00 00 00 04 54 00 00 00 ab 00 06 69 64 00 00 00 40 29 00 01 00 00 00 17 00 04 ff ff ff ff 00 00 65 6d 61 69 6c 00 00 00 40 29 00 02 ... 292 more bytes>
node_1 | 2020-11-17T10:23:47.124226895Z STREAM 47: maybeReadMore read 0
node_1 | 2020-11-17T10:23:47.124232516Z STREAM 47: read 0
node_1 | 2020-11-17T10:23:47.124237047Z STREAM 47: need readable true
node_1 | 2020-11-17T10:23:47.124241470Z STREAM 47: length less than watermark true
node_1 | 2020-11-17T10:23:47.124246208Z STREAM 47: do read
node_1 | 2020-11-17T10:23:47.124250712Z NET 47: _read
node_1 | 2020-11-17T10:23:47.127692847Z req event: /api/measurements [ 'resume' ]
node_1 | 2020-11-17T10:23:47.128124531Z STREAM 47: readableAddChunk <Buffer 5a 00 00 00 05 49>
@hideyukisaito
hideyukisaito / uploading-test.cs
Last active November 17, 2020 08:12
async POST with Best HTTP/2
/// <summary>
/// UploadTest function
/// </summary>
private async Task<bool> UploadTest(List<string> imagePaths, string json)
{
// Set UseAlternateSSLDefaultValue to true for TLS1.2
HTTPManager.UseAlternateSSLDefaultValue = true;
// Set long time for timeout
HTTPManager.RequestTimeout = TimeSpan.FromMinutes(10);
import sys
import os
import copy
class Section():
def __init__(self):
self.headers = []
self.tables = []
self.blocks = []
self.inserts = []
#include "ofApp.h"
ofImage img;
ofImage capture;
ofVideoPlayer video;
std::vector<ofPoint> positions;
std::vector<ofColor> colors;
import * as THREE from 'three';
import { EventEmitter } from 'events';
import 'three/examples/js/loaders/OBJLoader';
export default class MultipleOBJLoader extends EventEmitter {
pathsToLoad = {};
modelsLoaded = {};
numLoaded = 0;
# -*- coding: utf-8 -*-
import numpy as np
import cv2
import math
def rgb_to_hsv(r, g, b):
hsv = cv2.cvtColor(np.array([[[b, g, r]]], dtype=np.uint8), cv2.COLOR_BGR2HSV)[0][0]
return (hsv[0], hsv[1], hsv[2])
# -*- coding: utf-8 -*-
import numpy as np
import cv2
import math
def main():
img = cv2.imread('images/sample_8.jpg')
height, width, channels = img.shape
[verbose] ofxEdsdk::setup: connected camera model: Canon EOS 5D Mark III 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_Evf_OutputDevice / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_Evf_OutputDevice / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AEBracket / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AEMode / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AFMode / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_DriveMode / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_MeteringMode / 0
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_WhiteBalance / 0
@hideyukisaito
hideyukisaito / ofxEdsdk_crashed_at_init.txt
Last active April 1, 2016 11:50
Crashed at Eds::InitializeSDK
2016-04-01 20:45:42.106 exampleDebug[60445:27200058] -[__NSTaggedDate _cfurl]: unrecognized selector sent to instance 0x4d
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] An uncaught exception was raised
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] -[__NSTaggedDate _cfurl]: unrecognized selector sent to instance 0x4d
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] (
0 CoreFoundation 0x00007fff8ffb7ae2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff89d5af7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff8ffbab9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8fef3601 ___forwarding___ + 1009
4 CoreFoundation 0x00007fff8fef3188 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x00007fff8feb0749 CFURLCreateCopyAppendingPathComponent + 137