在 C++17 後要 sum type 可以這樣用:
#include<variant>
// data Solution = Surface Vector3 Double |
// Line Vector3 Vector3 |
location xxxx { | |
proxy_pass http://localhost:9000; | |
proxy_buffering off; | |
proxy_cache off; | |
proxy_redirect off; | |
proxy_set_header Connection ''; | |
proxy_http_version 1.1; | |
chunked_transfer_encoding off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
// | |
// Signer.swift | |
// Sign | |
// | |
// Created by Yung-Luen Lan on 2018/8/17. | |
// Copyright © 2018 yllan. All rights reserved. | |
// | |
import Foundation |
2 1 | |
4 1 | |
6 2 | |
8 1 | |
12 3 | |
16 1 | |
24 4 | |
30 6 | |
32 1 | |
36 6 |
/** | |
* Definition for singly-linked list. | |
* struct ListNode { | |
* int val; | |
* ListNode *next; | |
* ListNode() : val(0), next(nullptr) {} | |
* ListNode(int x) : val(x), next(nullptr) {} | |
* ListNode(int x, ListNode *next) : val(x), next(next) {} | |
* }; | |
*/ |
https://developer.apple.com/library/archive/documentation/mac/pdf/Text.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/MoreMacintoshToolbox.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/MacintoshToolboxEssentials.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/ResEditReference.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/ImagingWithQuickDraw.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/MacOS_RT_Architectures.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/Processes/Vertical_Retrace_Mgr.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/Sound/Sound_Input_Manager.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/Networking/DDP.pdf | |
https://developer.apple.com/library/archive/documentation/mac/pdf/Operating_System_Utilities/PRAM_Utilities.pdf |
const IDX = { | |
VHS: { P2: 6, P3: 7, P4: 8, P5: 9, P6: 10 } | |
} | |
const nudgePoints = (elementIndexes) => assign((ctx, evt) => { | |
const [x, y] = [evt.clientX, evt.clientY] | |
const [sx, sy] = ctx.lastClientPoint | |
const [dx, dy] = [x - sx, y - sy] | |
const paths = elementIndexes.map(idx => [0, ctx.groupIndex, idx]) | |
ctx.editorMethods.nudgeElementsAtPath(dx, dy, paths) | |
return { ...ctx, lastClientPoint: [x, y] } |
const pinchMachine = Machine({ | |
id: 'pinch', | |
initial: 'idle', | |
context: { | |
onPinch: () => {}, | |
onPan: ([dx, dy]) => {}, | |
finishPinch: () => {}, | |
onSingleTouch: { | |
touchStart: (currentPoint) => {}, | |
touchMove: (currentPoint) => {}, |
// Copyright (c) the JPEG XL Project | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
// | |
// main.swift | |
// ShitWeb | |
// | |
// Created by Yung-Luen Lan on 2020/5/14. | |
// Copyright © 2020 Yung-Luen Lan. All rights reserved. | |
// | |
import Foundation | |
import Network |