これは、OAuth 2.x 認証サーバーからのリダイレクトである localhost への HTTPS GET リクエストを受信するために作成された単純なサーバーのコードです。
リダイレクトURIに、SSL/TLS を必要とする HTTPS URL しか登録できない場合に使えます。
server.py
は HTTPS GET リクエストを受信すると、パラメータをつけたまま http://localhost
にリダイレクトします。
次のコマンドを実行して暗号化キーを作成します。
import cv2 | |
import numpy as np | |
cap = cv2.VideoCapture(0) | |
# replace each pixel with a character from array | |
chars = ["B", "S", "#", "&", "@", "$", "%", "*", "!", ":", "."] | |
chars = chars[::-1] | |
while True: |
Here, I explain how to change headings and body font in Microsoft Word. I used Microsoft Word for Mac Version 16.70. In Microsoft Word, there are default fonts and I couldn’t find a way to change them via GUI. When I change the theme, they are changed but it was hard to find a theme that uses the font I wanted to use. Then, I changed them with VBA. Code
I changed the default font as follows.
To change fonts to Times New Roman
#lang racket
から始める。#t
, #f
(define x expression)
; lambda を使った関数定義
(define a (lambda (x) (+ 1 x))
; 引数と一緒に関数定義
#!bin/bash | |
while IFS= read -r line | |
do | |
for i in $(seq 0 $(expr length "$line")) | |
do | |
# print each character | |
c="${line:$i:1}" | |
echo -n c | |
done |
for sub in $(az account list -o tsv --query '[].name'); do | |
echo "# subscription = $sub" | |
for id in $(az network private-endpoint list --subscription $sub --query '[] | networkInterfaces[].id' -o tsv); do | |
address=$(az network nic show --ids $id --query 'ipConfigurations[].privateIpAddress' -o tsv) | |
for fqdn in $(az network nic show --ids $id --query 'ipConfigurations[].privateLinkConnectionProperties.fqdns' -o tsv); do | |
if [ -z "$fqdn" ]; then | |
continue | |
fi | |
echo "$address $fqdn" | |
done |
open Microsoft.Data.SqlClient | |
module Sample = | |
[<Literal>] | |
let connectionString = "Server=sample.database.windows.net;Database=db_name;User Id=user_id;Password=password;" | |
let run() = | |
use connection = new SqlConnection(connectionString) | |
use command = new SqlCommand("SELECT * FROM sample", connection) | |
connection.Open() |
open Google.Apis.Auth.OAuth2 | |
open Google.Apis.Gmail.v1 | |
open Google.Apis.Http | |
open Google.Apis.Services | |
open Google.Apis.Util.Store | |
open System | |
open System.Threading | |
type EmailFinder() = | |
let configDir: string = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/.gmail_config" |