Skip to content

Instantly share code, notes, and snippets.

@gekka
gekka / coverage2html.ps1
Created February 10, 2026 09:00
Visual StudioのCode CoverageのXMLファイルをHTMLにする
param(
[Parameter(Mandatory = $true)] [string]$pathXML ,
[Parameter(Mandatory = $true)] [string]$pathXSLT,
[Parameter(Mandatory = $false)] [string]$pathHTML
)
if (-not (Test-Path $pathXML)) {
Write-Error "入力ファイルが見つかりません: $pathXML"
exit 1
@gekka
gekka / test.cpp
Created December 19, 2025 12:38
IMFMediaEngine::TransferVideoFrameのテスト
// TransferVideoFrameの第1引数で可能な引数の型
// {C40A00F2-B93A-4D80-AE8C-5A1C634F58E4} IID_IMFSample
// {6F15AAF2-D208-4E89-9AB4-489535D34F9C} IID_ID3D11Texture2D
// {00000121-a8f2-4877-ba0a-fd2b6645fb94} IID_IWICBitmap
// {696442BE-A72E-4059-BC79-5B5C98040FAD} IID_ID3D12Resource
class NotifySink : public IMFMediaEngineNotify
{
public:
@gekka
gekka / script.sql
Created May 16, 2024 10:35
SQL Server Management Studio Geometry BUG
USE [Test2]
GO
/****** Object: Table [dbo].[A3814_01_1] Script Date: 2024/05/16 18:12:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[A3814_01_1](
[ID] [int] IDENTITY(1,1) NOT NULL,
[A38a_001] [nvarchar](255) NULL,
@gekka
gekka / pch.h
Created April 16, 2024 18:30
Unicodeを書記素で切り出せるCStringを試す
// pch.h: プリコンパイル済みヘッダー ファイルです。
// 次のファイルは、その後のビルドのビルド パフォーマンスを向上させるため 1 回だけコンパイルされます。
// コード補完や多くのコード参照機能などの IntelliSense パフォーマンスにも影響します。
// ただし、ここに一覧表示されているファイルは、ビルド間でいずれかが更新されると、すべてが再コンパイルされます。
// 頻繁に更新するファイルをここに追加しないでください。追加すると、パフォーマンス上の利点がなくなります。
#ifndef PCH_H
#define PCH_H
#define CString CStringDef
@gekka
gekka / CStringExtension.cpp
Last active April 16, 2024 09:47
ユニコードを異字体セレクタとかを考慮した1文字ごとに分割
#include "test.h"
#include <afxwin.h>
#include <icu.h>
#pragma comment(lib, "icu.lib")
typedef struct GraphemeLeft_ {
uint32_t value;
GraphemeLeft_(int i) : value(i) { };

Wouldn't the behavior you want be achieved by setting the Owner property instead of setting the Topmost property for sub-window?

public partial class MainWindow : Window
{
    public MainWindow()
    {
        //InitializeComponent();
        this.Title = "MainWindow";
<Canvas x:Name="myCanvas" Cursor="">
<Canvas.Resources>
<ControlTemplate TargetType="Thumb" x:Key="markerTemplate">
<Rectangle x:Name="rect"
Stroke="{TemplateBinding Background}"
Fill="Transparent"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"/>
</ControlTemplate>
Public Sub ExportTest()
Dim ads As Excel.AddIns
Set ads = Application.AddIns
Dim iAd As Integer
Dim iPrj As Integer
For iAd = 1 To ads.Count
Dim ad As Excel.AddIn
@gekka
gekka / ContentDialogSample.cs
Created April 11, 2023 10:40
UWPのContentDialogのサンプル
//https://social.msdn.microsoft.com/Forums/ja-JP/8a58899a-a324-48db-80c0-e0befddfee52/
public async static Task<string> MessageQuestion(string title, string text, params string[] answers)
{
StackPanel panel = new StackPanel();
foreach (var ans in answers)
{
RadioButton r = new RadioButton() { Content = ans };
panel.Children.Add(r);
<Window x:Class="WpfApp1.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:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="300">
<Window.Resources>