Skip to content

Instantly share code, notes, and snippets.

#include <fstream>
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
using namespace std;
とりあえずWebサイトの指定があったので...
@toya33
toya33 / MainWindow.xaml.cs
Last active October 15, 2017 15:12
C#からC++のDLLを呼び出す際の最低限の内容(文字列のマーシャリング含む)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
#!/bin/sh
#概要:
# ローカルのmongodbサーバに対してfindコマンドを実行する
# 対象のコレクション名は第一引数、検索条件は第二引数で指定する
# 第二引数がない場合は検索条件なしで第一引数のコレクションに対し
# findコマンドを実行する
#
#引数:
# 第一引数-コレクション名
expect_sample.sh
--------------------------------------------------------------
#!/bin/sh
COMMAND="ls -la"
expect -c"
set timeout 5
spawn env LANG=C /usr/bin/ssh UserName@host
expect \"\\\% \"
引数として渡されたプロセス名が起していれば
プロセスを強制終了する
process.sh
------------------------------
#!/bin/sh
#プロセス名を引数として受け取る
PROCESS_NAME=$0
// DirectShowTest_1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include <dshow.h>
#define FILENAME L"D:\\sample\\CIMG0145.AVI"
int _tmain(int argc, _TCHAR* argv[])
@toya33
toya33 / structの間違った使い方
Created December 2, 2014 15:02
Structの間違った使い方
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication7
{
public struct Test
{
@toya33
toya33 / bandwidth.ino
Last active December 21, 2015 17:48
Arduino 転送帯域チェック用のベンチマーク
long starttime,endtime,elapsedtime;
long baudrate=115200;
long number=500;
void setup(){
Serial.begin(baudrate);
}
void loop(){
@toya33
toya33 / compare_vectorInt_vectorBoolean
Last active December 20, 2015 16:58
vector<int>とvector<boolean>を要素数1で宣言した場合にそれぞれに必要なサイズを表示する
#include <StandardCplusplus.h>
#include <system_configuration.h>
#include <unwind-cxx.h>
#include <utility.h>
#include <vector>
void setup(){
Serial.begin(9600);
}
void loop(){