Skip to content

Instantly share code, notes, and snippets.

View souri-t's full-sized avatar

HIYOSHI YOSUKE(Andy) souri-t

View GitHub Profile

@material-ui/pickersではなく、@mui/x-date-pickersを使用してDatePickerを作成する方法について説明します。

  1. @mui/x-date-pickersのインストール

まずはじめに、Reactのプロジェクトに@mui/x-date-pickersをインストールします。

npm install @mui/x-date-pickers
メンバーにサブクラスが含まれる場合、値が空でないことを確認するためには、サブクラスの各メンバーに対しても同様の処理を行う必要があります。また、個別にメンバーを見るよりも、反射を使用してクラスのすべてのメンバーをチェックすることができます。
以下は、反射を使用してクラスのすべてのメンバーが空でないことを確認するコードの例です。
```csharp
public static bool CheckAllMembersAreNotEmpty(object obj)
{
// オブジェクトがnullの場合はfalseを返す
if (obj == null)
{

Entity Framework Coreで以下のように1対多の関係を持つクラスがあります。 Parent.ParentIdが外部キーです。 コントローラーのGetメソッドでParentの配列を取得する際にChild.nameを含んで取得する方法を教えて下さい。

public class Parent { public string name; public List childs; }

public class Child {

Blazorアプリ上でWindows認証を実装するためには、以下の手順を実行する必要があります。

  1. ASP.NET Core Identityパッケージをインストールします。
dotnet add package Microsoft.AspNetCore.Identity
  1. Startup.csファイル内に、以下のようにConfigureServicesメソッドを作成します。

BlazorアプリでWindows認証を実装するには、以下の手順に従ってください。

ASP.NET CoreのWindows認証を有効にする まず、ASP.NET CoreアプリケーションでWindows認証を有効にする必要があります。これは、アプリケーションのStartup.csファイルのConfigureServicesメソッドで行うことができます。次のように、AddAuthenticationメソッドを呼び出して、Windows認証を有効にします。

scss Copy code services.AddAuthentication(IISDefaults.AuthenticationScheme); Blazorアプリで認証を使用する 次に、Blazorアプリで認証を使用できるようにします。これには、BlazorアプリのApp.razorファイルで、AuthorizeViewコンポーネントを使用することが含まれます。AuthorizeViewコンポーネントは、ユーザーが認証されている場合にコンポーネントを表示し、認証されていない場合に非表示にします。

@page "/"
<table class="table" ref="tableRef">
<thead>
<tr>
<th style="position:relative;" @onmousedown="@MouseDownHandler" @onmousemove="@MouseMoveHandler" @onmouseup="@MouseUpHandler">列1</th>
<th style="position:relative;" @onmousedown="@MouseDownHandler" @onmousemove="@MouseMoveHandler" @onmouseup="@MouseUpHandler">列2</th>
<th style="position:relative;" @onmousedown="@MouseDownHandler" @onmousemove="@MouseMoveHandler" @onmouseup="@MouseUpHandler">列3</th>
<th style="position:relative;" @onmousedown="@MouseDownHandler" @onmousemove="@MouseMoveHandler" @onmouseup="@MouseUpHandler">列4</th>
</tr>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>可変サイズのテーブル</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
th.resize {
position: relative;
cursor: ew-resize;
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

概要

あいち旅eマネー地域ポイント店として指定されている名駅〜栄周辺の飲食店と小売店のリスト。

以下からスクレイピング。

加盟施設一覧

Google Mapにマッピングしたレイヤは以下。