演算子 | 種類 |
---|---|
+,-,*,/ | 加算,減算,乗算,除算 |
&,|,^ | 論理演算(and,or,xor) |
\ |
割り算の余り |
=,<,>,! | 条件式(同じ,小さい,大きい,同じでない) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(()=>{ | |
const orders = Array.from(document.querySelectorAll('#ordersContainer > .order')); | |
let records = orders.flatMap(order => { | |
const id = order.querySelector('.yohtmlc-order-id .value').textContent.trim(); | |
const date = order.querySelector('.a-span3 .value').textContent.trim(); | |
const total = order.querySelector('.yohtmlc-order-total .value').textContent.trim(); | |
const itemTitles = Array.from( | |
order.querySelectorAll('.yohtmlc-item > .a-row:nth-child(1)')). | |
map(e => e.textContent.trim()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file 選択した英文を日本語に翻訳 | |
* | |
* 注:Shift_JISで保存してください (サクラエディタマクロの制約事項) | |
*/ | |
var text = Editor.GetSelectedString(0) | |
.replace(/\r\n/g, '\n') | |
.replace(/\t/g, '') | |
.replace(/\. /g, '.\n'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define global _while(%1) repeat : if (%1) == 0 : break | |
#define global _for(%1,%2=0,%3=0,%4=1) %1=(%2) %c repeat %c if cnt {%1+=(%4)} %c if (%1) == (%3) {break} | |
mes "break/continueを使えるwhileのサンプル" | |
i = 0 | |
_while i < 4 | |
mes i | |
i++ | |
loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# python main.py --loglevel <level> | |
# | |
# level: | |
# CRITICAL | |
# ERROR | |
# WARNING | |
# INFO | |
# DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"disable_existing_loggers": false, | |
"formatters": { | |
"default": { | |
"format": "%(levelname)s:%(name)s:%(message)s" | |
} | |
}, | |
"handlers": { | |
"console": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub IterateThroughTableContainingMergedCells() | |
Dim t As Table | |
Dim i As Long | |
Dim j As Long | |
For i = 1 To ActiveDocument.Tables.Count | |
Set t = ActiveDocument.Tables(i) | |
Debug.Print "Table(" & i & "): rows=" & t.Rows.Count & ", columns=" & t.Columns.Count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if "%~1" == "addpath" goto ADDPATH | |
if "%~1" == "help" goto HELP | |
if "%~1" == "-h" goto HELP | |
if "%~1" == "--help" goto HELP | |
if "%~1" == "/?" goto HELP | |
if "%~1" == "-?" goto HELP | |
goto :EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@explorer shell:RecycleBinFolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
r""" | |
Sample output: | |
C:\Users\USERNAME\repos\python3-exception-with-values>python traceback_with_values.py | |
Traceback (most recent call last): | |
File "traceback_with_values.py", line 45, in <module> | |
print(float(x) + y) |