はてなキーワード: valueとは
LaTeXで、縦書き人文書のように全角括弧内()の級数下げをするマクロを書いた。
・「(」が来ると級数下げる
・「)」が来ると級数上る
・「()」のなかに入れ子の「()」が来た場合は、変更しない(本づくりのお作法)
※ 「(」と「)」が対応してないと級数下げたまま、になってしまう可能性があるので、ちゃんと合わせておくこと
\usepackage{relsize}\usepackage{newunicodechar}\newif\iffoot\footfalse\newcounter{parnest}\setcounter{parnest}{0}%()内の級数下げマクロ:変数の準備(級数下げしたくない箇所は、()の前後を\foottrue~\footfalseで括ること)
\let\origfootnotetext\footnotetext\renewcommand{\footnotetext}[2][]{\ifx\relax#1\relax \origfootnotetext{\foottrue #2 \footfalse}\else\origfootnotetext[#1]{\foottrue #2 \footfalse}\fi}\let\origfootnote\footnote\renewcommand{\footnote}[1]{\ifnum\ltjgetparameter{direction}=3\origfootnote{\foottrue #1 \footfalse}\else\origfootnote{\foottrue #1 \footfalse}\fi}%脚注コマンドを変更
\let\origendnotetext\endnotetext\renewcommand{\endnotetext}[2][]{\ifx\relax#1\relax \origendnotetext{\foottrue #2 \footfalse}\else\origendnotetext[#1]{\foottrue #2 \footfalse}\fi}\let\origendnote\endnote\renewcommand{\endnote}[1]{\ifnum\ltjgetparameter{direction}=3\origendnote{\foottrue #1 \footfalse}\else\origendnote{\foottrue #1 \footfalse}\fi}%文末脚注コマンドを変更
\makeatletter\chardef\my@J@kakkostart="FF08\newunicodechar{(}{\iffoot\my@J@kakkostart\else\addtocounter{parnest}{1}\ifnum\value{parnest}=1 \relsize{-0.5}\my@J@kakkostart\else\my@J@kakkostart\fi\fi}\makeatother%開くカッコは脚注外では級数下げ
\makeatletter\chardef\my@J@kakkoend="FF09\newunicodechar{)}{\iffoot\my@J@kakkoend\else\addtocounter{parnest}{-1}\ifnum\value{parnest}=0 \my@J@kakkoend\relsize{0.5}\else\my@J@kakkoend\fi\fi}\makeatother%閉じるカッコは脚注外では級数上げ(元に戻す)
Sub CheckForGarbledCharacters()
Dim rng As Range
Dim i As Integer
Dim garbledFound As Boolean
Dim unicodeVal As Long
garbledFound = False
' すべてのワークシートをチェックします。
For Each ws In ThisWorkbook.Worksheets
For Each cell In rng
If Not ((32 <= unicodeVal And unicodeVal <= 126) Or (12353 <= unicodeVal And unicodeVal <= 12447) Or (12448 <= unicodeVal And unicodeVal <= 12543) Or (65382 <= unicodeVal And unicodeVal <= 65439) Or (19968 <= unicodeVal And unicodeVal <= 40959)) Then
MsgBox "文字化けが見つかりました: " & vbCrLf & _
"ワークシート: " & ws.Name & vbCrLf & _
"セル: " & cell.Address & vbCrLf & _
"セルの値: " & cell.Value & vbCrLf & _
"文字化けしている文字: " & char, vbExclamation
garbledFound = True
Exit For
End If
Next i
' 文字化けが見つかった場合、次のワークシートへ移動します。
If garbledFound Then Exit For
If garbledFound Then Exit For
If Not garbledFound Then
MsgBox "文字化けが見つかりませんでした。", vbInformation
End If
End Sub
Sub ImportTextFileWithoutDelimiter()
Dim targetSheet As Worksheet
Dim fileNo As Integer
Dim lines As Variant
Dim i As Long
fileName = "C:\path\to\your\file.txt"
Set targetSheet = ThisWorkbook.Worksheets("Sheet1")
fileNo = FreeFile()
Open fileName For Input As fileNo
content = Input(LOF(fileNo), fileNo)
Close fileNo
lines = Split(content, vbCrLf)
' 各行をワークシートに貼り付けます。
For i = LBound(lines) To UBound(lines)
targetSheet.Cells(i + 1, 1).Value = lines(i)
Next i
End Sub
Option Explicit
Dim targetSheet As Worksheet
Dim fso As Object, folder As Object, file As Object
folderPath = "C:\path\to\your\folder"
Set targetSheet = ThisWorkbook.Worksheets("Sheet1")
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(folderPath)
With targetSheet
.Cells(1, 1).Value = "File Name"
.Cells(1, 2).Value = "File Size"
.Cells(1, 3).Value = "Timestamp"
End With
' 次の行番号を取得します。
nextRow = 2
' フォルダ内のファイル情報を取得し、ワークシートに書き込みます。
For Each file In folder.Files
With targetSheet
.Cells(nextRow, 1).Value = file.Name
.Cells(nextRow, 2).Value = file.Size
.Cells(nextRow, 3).Value = file.DateLastModified
End With
Next file
End Sub
A:はい、私はアセンブリ言語のコードを記述することができます。アセンブリ言語は、コンピュータのプロセッサが理解できる低水準の機械語命令に直接対応するプログラム言語であり、CPUの命令セットアーキテクチャに依存するため、異なるCPUアーキテクチャに対して異なるコードが必要です。
以下は、x86アーキテクチャ向けの単純なアセンブリ言語の例です。これは、メモリの特定の場所にある2つの数値を加算して、結果をレジスタに格納するプログラムです。
Copy code
section .data
num1 dd 10 ; Define num1 as a double word (32-bit integer) and set its initial value to 10
num2 dd 20 ; Define num2 as a double word and set its initial value to 20
section .text
global _start ; Declare the entry point for the program
_start:
mov eax, [num1] ; Move the value of num1 into the eax register
add eax, [num2] ; Add the value of num2 to the eax register
mov [result], eax ; Move the value in eax to the memory location "result"
section .data
result dd 0 ; Define result as a double word and set its initial value to 0
このプログラムは、num1の値をeaxレジスタに移動し、num2の値をeaxレジスタに加算し、最後にeaxレジスタの値をresultメモリアドレスに保存します。
お金払わないと無理っぽくて、せっかく考えたのに悲しいのでここで供養させてね
https://courrier.jp/news/archives/314638/
https://unherd.com/2022/12/japans-cynical-war-on-woke/
I feel that the idea that 'it is right for all humans, regardless of their ethnic or cultural background, to be "woke" in a Western way' is discriminatory.
Is it really possible to easily judge whether "woke" is happening in cultures or value systems that differ from the Western perspective?
Additionally, as someone who is currently a female college student in Japan, I have a sense of discomfort with the author's argument that "social movements in Japan do not happen from the bottom up, but rather top-down."
On a separate note, I believe that for those who are not familiar with the difference between "茶道" and "茶芸" discussing East Asian art may not only be a little crude when it comes to Japanese culture, but also Chinese culture.
class PromiseSimple { constructor(executionFunction) { this.promiseChain = []; this.handleError = () => {}; this.onResolve = this.onResolve.bind(this); this.onReject = this.onReject.bind(this); executionFunction(this.onResolve, this.onReject); } then(handleSuccess) { this.promiseChain.push(handleSuccess); return this; } catch(handleError) { this.handleError = handleError; return this; } onResolve(value) { let storedValue = value; try { this.promiseChain.forEach((nextFunction) => { storedValue = nextFunction(storedValue); }); } catch (error) { this.promiseChain = []; this.onReject(error); } } onReject(error) { this.handleError(error); } }
やったー!プログラムとか全くわからんけどChatGPTに聞いたら前から欲しかったブックマークレットの機能を簡単に作ってくれたぜ
JavaScriptで今見ているサイトのタイトルをクリップボードにコピーするブックマークレットのコードは、以下のようになります。
javascript:(function(){
let input = document.createElement("input");
document.body.appendChild(input);
input.select();
document.execCommand("copy");
document.body.removeChild(input);
alert("クリップボードに「" + title + "」をコピーしました。");
})();
https://www.youtube.com/watch?v=yhDLmGpjdms
これよりもっとひどい動画はごまんとあるが、ここまでタイトルで煽っている以上指摘するわ。
プロフィール見るとCTOを経て独立してプログラミングスクールの会社やっているっぽいけど、すごい時代だな。
晒しになっちゃったけど、他にも有名(と思われる)プログラミング系YouTuberが実際にコードを書いている場合でひどいのはザクザク見つけられるから、見つけてため息をつくといいと思います。
そうなんだ。
ちょっと調べたわ。
If MultiSelect is True, the return value is an array of the selected file names (even if only one file name is selected). Returns False if the user cancels the dialog box.
https://learn.microsoft.com/en-us/office/vba/api/excel.application.getopenfilename
https://b.hatena.ne.jp/entry/kaigainohannoublog.blog55.fc2.com/blog-entry-4291.html
https://www.facebook.com/reel/389380193304358/
関連度の高い順で上から
.
.
.
.
.
.
.
.
書式なしテキストとして貼り付け
「csvを読み込んで~、該当列を指定してsumifs関数を使ったんですけど~、0になるんですよ~」
「ああ、たぶん金額のところがテキストになっているから、csvを読み込みなおして、数値に変換するか、クエリ自体をコピペして別のシートに書式なしテキストとして張り付けて、該当行をvalue関数で変換してからsumifsをつかってやるといいよ」
わたしは聞くに堪えないと思い、説明している最中の同僚の胸倉をつかみ、頬を2回叩いた
「round関数が~」、「マクロで~」、「ピボットを~」、それでも同僚は話すのを止めないので、同僚の髪の後ろの主電源を切ったのち、電源を入れなおす
蛍光灯が明滅し、セミの鳴き声が逆再生され、私の思考も溶けていく
「あたいが読み込まれる~」と新人がつまんねえことを言いながら窓を突き破り、宙へ飲み込まれていく
世界は再起動され、0と1が書き込まれ、新世界が想像されていく
割りとマジだよねと思う出来事をふと思い出したので書いてみる。
といっても後輩が俺の思ってもいないところでつまづいて、それに俺がカルチャーショックを受けたというだけの話。
問題の話なんだけど、とある有名サービスのJSON APIを叩いて呼び出し結果を手元のオブジェクトにマッピングするというただそれだけのコードを書くというもの。
普通に考えて一日もしないで出来ると思うような代物だけど、三日以上悩んで彼はそれでも出来なかった。
{ ..., "count": 10000000000000000000000000000000000000, ...}
という感じで多倍長整数がリテラルとして書かれているのを前提として受け取る仕様だった。
JavaScriptの通常の整数と違って、JSONの整数リテラルは仕様上大きさの制限の記載がないので、上のようなのも合法。
で、彼の使ってたプログラミング言語のオブジェクト から JSONの変換ライブラリが、多倍長整数を文字列("")としてシリアライズするような仕様なことがわかって、彼は行き詰まった。
そこで何をやり始めたかというと、JSONの整数がそのまま1000000000000000みたいにシリアライズされるライブラリ探し始めたんだけど、それは見つからないまま。
というわけで「増田さん、詰まってるんですけど……」と言われて助け舟出すことになったはいいものの、彼のコード見るとJSONの抽象構文木クラスがそのまま使えるようだった。
なので、
String serialiaze(Ast.JsValue value) { return switch(value) { case Ast.JsNull nullValue-> "null"; case Ast.JsInt bigIntValue -> bigIntValue.toString(); case Ast.JsArray arrayValue -> arrayValue.stream().map(v -> serialize(v)).collect(Collectors.joining(", ", "[", "]")); // 他のJSONの木についても同様に処理 default -> throw new RuntimeException("cannot reach") }; }
1時間しない内にこんな感じのコード(言語はJavaじゃなかったけど、だいたいこういう感じ)を書いて無事問題解決。細かいタイポとかあるかもだけど、日記では確認してないのでそれはおいといて)。
結局、JSONの形が期待と違って、しかも既存のAPIじゃいいのがなかったのに延々API探すことしか出来なかったのが問題解決できなかった原因だけど、このくらいのは割りとちょこちょこある。
きっと、それから一週間放置しても問題解決できなかっただろうし、どうも同じチームの同僚も問題を解決できなかったようだった。
最近、APIは叩けるけど、そこでトラブルとどうにもならなくエンジニアにちょくちょく遭遇するんだけど、やっぱりもうちょっと基礎出来てないと駄目だなと思った出来事だった。
During my lifetime I've probably drank enough whisky to fill an Olympic size swimming pool, but whisky flavoured foods of any description should be avoided like the plague.
私は一生の間に、おそらくオリンピックサイズのプールを満たすのに十分な量のウィスキーを飲みましたが、どのような種類のウィスキー風味の食べ物もペストのように避けるべきです.
An Olympic-size swimming pool is used as a colloquial unit of volume, to make approximate comparisons to similarly sized objects or volumes. It is not a specific definition, as there is no official limit on the depth of an Olympic pool. The value has an order of magnitude of 1 megaliter (ML).[1]
オリンピック サイズのスイミング プールは、口語的な体積の単位として使用され、同様のサイズのオブジェクトまたは体積とのおおよその比較を行います。 オリンピックプールの深さには公式の制限がないため、これは特定の定義ではありません。 値は 1 メガリットル (ML) の大きさのオーダーを持っています。 [1]
エタノールの比重を約0.8g/cm3とすると、一日の許容量は40度のウィスキー約62.5mL
毎日ウィスキーだけ飲み続けたとして、1MLに達するのは、1,000,000,000(mL)÷62.5(mL/日)=16,000,000(日)。うるう年を考慮せず365で割った結果は、43,835年と225日
期間を50年以上、20,000日と仮定する。1,000,000,000(mL)÷20,000(日)=50,000(mL)。Lに直すと、一日あたり50リットル以上
ウィスキーのダブルは約60mLになる。これを一日3杯ずつ20,000日間飲んだとすると、180(mL/日)×20,000(日)=3,600,000(mL)=3,600(L)
この程度の量を計るのに適切な単位はバレルだろう
バレル - Wikipedia
アメリカでは、用途によらない標準の液量バレル (standard barrel for liquids) は31.5米液量ガロン(正確に119.240 471 196リットル)である。
ただし、税法上、ビール用のバレル (standard beer barrel) は31米液量ガロン(正確に117.347 765 304リットル)となっている。
一方、穀物や野菜などに用いられる標準乾量バレル (standard dry barrel) は、105乾量クォート(約115.6リットル)と定義されている。
イギリスでは、標準のビールバレルは36英ガロン(正確に163.659 24リットル)である。石油用のバレルを英ガロンで表すと約35ガロンとなる。
さらに、用途によっては質量によるバレルの定義が行われている(例:小麦粉=196ポンド、セメント=376ポンド)。
ワインやウイスキーなどの酒類の貯蔵に用いられる樽の種類でバレルと呼ばれるものは、容量42 - 55米ガロン(約208.2リットル)くらいまでのものが用いられる。
「私は一生の間に、おそらく樽2ダースを満たすのに十分な量のウィスキーを飲みました」と言い換えれば大ボラをつかずに済むということになる
CNNの記事なので英語の元記事を見てみよう、どういう表現だろうか
Tonga eruption blasted enough water to fill 58,000 Olympic pools into the Earth's atmosphere, NASA says
The eruption sent a tall plume of water vapor into the stratosphere, which is located between 8 and 33 miles (12 and 53 kilometers) above the Earth's surface. It was enough water to fill 58,000 Olympic-sized swimming pools, according to detections from a NASA satellite.
この噴火により、地表から 12 ~ 53 km (8 ~ 33 マイル) の高さに位置する成層圏に、水蒸気の高いプルームが送り込まれました。 NASA の衛星からの検出によると、オリンピック サイズのプール 58,000 個を満たすのに十分な量の水でした。
英語圏でよく使われるのだろうか?この「プール何杯分」というのは
twitterで「fill pools until:2022-01-01」の検索条件で検索してみる
すると以下のようなニュースがツイートされているのを発見(「The Hustle」という媒体のようだ)
In 2020, US gas stations sold enough gas to fill 187k Olympic-size swimming pools. But most don’t make money from gas. Here’s why.
2020 年、米国のガソリン スタンドは、187,000 個のオリンピック サイズのプールを満たすのに十分な量のガソリンを販売しました。しかし、ほとんどの人はガスからお金を稼ぎません。理由は次のとおりです。
ニュースサイトではない一般ユーザーもこのような表現をしていた
During my lifetime I've probably drank enough whisky to fill an Olympic size swimming pool, but whisky flavoured foods of any description should be avoided like the plague.
私は一生の間に、おそらくオリンピックサイズのプールを満たすのに十分な量のウィスキーを飲みましたが、どのような種類のウィスキー風味の食べ物もペストのように避けるべきです.
英語版wikipediaの「Olympic-size swimming pool」のページを見てみよう
An Olympic-size swimming pool is used as a colloquial unit of volume, to make approximate comparisons to similarly sized objects or volumes. It is not a specific definition, as there is no official limit on the depth of an Olympic pool. The value has an order of magnitude of 1 megaliter (ML).[1]
オリンピック サイズのスイミング プールは、口語的な体積の単位として使用され、同様のサイズのオブジェクトまたは体積とのおおよその比較を行います。 オリンピックプールの深さには公式の制限がないため、これは特定の定義ではありません。 値は 1 メガリットル (ML) の大きさのオーダーを持っています。 [1]
なるほど、この書き方だとニュースの定型句に限らず一般的に使う言い回しに見える
※追記:
編集履歴を確認したところ00:16, 30 May 2003のリビジョン時点で以下の記述がある
少なくとも20年前からこのような言い回しがwikipediaに書かれる程度には一般的だったようだ
An Olympic Size Swimming Pool is the type of pool used in the Olympic Games. The size of the pool is commonly used to define the size of other objects, or to explain how much water is in a particular location.
オリンピック サイズのスイミング プールは、オリンピックで使用されるプールの種類です。 プールのサイズは、通常、他のオブジェクトのサイズを定義したり、特定の場所にある水の量を説明したりするために使用されます。
追記ここまで
英語圏の人はピンと来てるのだろうかこの言い方で
勘だがピンとこない人も結構いる気がする
だって日本人でも「東京ドーム何杯分」がピンとこない人は結構いるからな
調べてみたがなかなか興味深かった、他にもこういう海外のよくわからん単位がありそうだ
「フットボールコート何個分」みたいな面積についての言い回しもあるみたいだったし
その国固有の例えとかありそうで面白い
イタリアなら「コロッセオ何杯分」とかあったりしそう(調べてないけど)
※再追記:
以下の英WikipediaのページのVolumeのCasual unitsの項がズバリだ
https://en.wikipedia.org/wiki/List_of_unusual_units_of_measurement
自動で安価をつけて返信するプログラムでもこんなに長く複雑になる(一部抜粋)
/**************************************
以下のCSV_DIR, FILE_PATHS, SETTINGSを書き換えてね。 <h3>o- *************************************/</h3>
//CSVファイルが置かれてるディレクトリのパス。投稿前にエラー出たら大体ここの設定ミス。 例:"C:\\Users\\sakuraimasahiro\\Documents\\iMacros\\Macros\\rentou\\";
'C:\\Users\\USER\\Desktop\\iMacros\\Macros\\rentou\\';
//ファイルのパス。CSVは絶対パスで、拡張子も必要。iimは相対パスでよく、拡張子不要。
const FILE_PATHS = {
textCsv: CSV_DIR + 'textNoAnker.csv',
//レス用投稿文が書かれたCSV。通常とレス用で分けないなら同じファイルを使えばいい。
replyTextCsv: CSV_DIR + 'textReply.csv',
};
baseWaitTime: 5,
//baseWaitTime+0~waitTimeRange(ランダム)だけ待つ
waitTimeRange: 5,
//連投しすぎだと忠告された場合に処理を一時停止させる時間(秒)
waitTimeForAvoidingPunishment: 60 * 30,
//メール
mail: 'sage',
//名前設定
name: '',
//以下、偽装ワッチョイ設定。浪人でワッチョイを非表示にしてるときだけtrueにしてね。
//妙なニックネーム(ワッチョイ、アウアウウーなど)をランダムで決めて付加するかどうか。true=付加する。false=付加しない。
//妙なニックネームの後に付く8桁の文字列をランダムで決めて付加するかどうか。
},
//アンカー無し投稿をするならtrue。しないならfalse。noAnkerPostかreplyPostのどちらかはtrueにすること(両方trueでもOK)。
//アンカー付き投稿(返信)をするならtrue。しないならfalse。もしnoAnkerPostとreplyPostの両方がtrueの場合、投稿は返信が優先され、返信対象が見つからなくなったらアンカー無し投稿をする。
//最初に取得するアンカー無し投稿文CSVファイルの行番号。もし返信用と同じCSVファイルを使うなら-1と入力。
noAnkerPostTextCsvStartRow: 1,
//最初に取得する返信用投稿文CSVファイルの行番号。もしアンカー無しと同じCSVファイルを使うなら-1と入力。
//テキストCSV/返信用テキストCSVの取得行が最終行に達したら最初の行まで戻るかどうか。true=戻る。false=マクロ終了。
//返信する場合、これより小さなレス番には返信しない。返信を投稿すると、この数値は前回の返信先のレス番に更新される。
minAnker: 895,
//返信する場合、名前に以下の文字列を含む投稿にアンカーをつけて返信する(ワッチョイやIPなど名前フィールドにあるものならなんでも可)。配列で複数指定可能。指定無しなら空配列([])。filterNamesとfilterNamesNotIncluded共に無指定ならレス番1から順に返信していく(minAnkerが設定されてればそこから順に)。以下のfilter系は全て併用可能。
//↑とは逆に、名前に以下の文字列を含まない投稿にアンカーをつけて返信する。↑と併用も可能。
//返信する場合、本文に以下の文字列を含む投稿にアンカーをつけて返信する。
filterText: ['自演かな', '自演わらわら', 'スクリプト使うの', '安価ガバ', '>>660', '自演で擁護', '最後' ,'あいうえお', 'かきくけこ', 'さしすせそ', 'なにぬねの', 'はひふへほ', 'まみむめも', 'やいゆえよ', 'やゆよ', 'らりるれろ', 'わいうえを', 'わをん', 'わいうえをん'],
},
//自分のIPアドレスの確認。VPNとかでIPを変更してマクロを動かしてるとき、突然VPNが作動しなくなってIPが元に戻ったときにマクロを止めるためのもの。
//以下の文字列が自分の現在のIPアドレスに含まれている場合、マクロを一時停止する。基本的に自分の本当のIPアドレスを入力。
},
//浪人設定。最後に動作を確認したのは5年くらい前で、今も同じように動作するかは、浪人を持ってないから確認できずわからない。
//浪人にログインしてるかどうかをチェックするかどうか。trueならする。falseならしない。trueにしていてもし浪人にログインしていないことを確認したらログインしにいく。
password: '1234',
},
};
/**************************************
設定箇所終わり。
https://info.5ch.net/index.php/%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%82%81%E3%81%AA%E3%81%84%E6%99%82%E3%81%AE%E6%97%A9%E8%A6%8B%E8%A1%A8 <h3>o- *************************************/</h3>
/**************************************
・NULL演算子(??)は使えない。論理積(&&)は使える。
・オブジェクトの分割代入はできない。
・importはできない。 <h3>o- *************************************/</h3>
/**************************************
関数 <h3>o- *************************************/</h3>
/**
* ここから始まる。
*/
checkSettings();
var _TextCsvCursors = new TextCsvCursors(
SETTINGS.postSettings.noAnkerPostTextCsvStartRow > 0
? SETTINGS.postSettings.noAnkerPostTextCsvStartRow - 1
: SETTINGS.postSettings.noAnkerPostTextCsvStartRow,
SETTINGS.postSettings.textCsvLoop,
),
SETTINGS.postSettings.replyPostTextCsvStartRow > 0
? SETTINGS.postSettings.replyPostTextCsvStartRow - 1
: SETTINGS.postSettings.replyPostTextCsvStartRow,
SETTINGS.postSettings.textCsvLoop,
),
);
var _LoopStatuses = new LoopStatuses(0, SETTINGS.postSettings.minAnker);
const _MyPosterName = new MyPosterName({
name: SETTINGS.nameSettings.name,
});
const _ThreadUrl = openPromptThreadUrl();
//ループ
while (true) {
SETTINGS.ipSettings.checkIp && checkCurrentIpNotTheIp();
//スレを開く
openUrl(_ThreadUrl.fullUrlHttps());
//浪人にログインする設定なら、浪人にログインしているかどうかを確認し、していなければログインしにいく。
if (SETTINGS.roninSettings.checkLogin) {
}
}
if (SETTINGS.postSettings.replyPost) {
const targetAnkerNumber = createPostDOMList()
.filterPostnumberHigher(_LoopStatuses.currentMinAnker())
.filterByPostername(SETTINGS.postSettings.filterNames)
.filterByPosternameNotIncluded(
SETTINGS.postSettings.filterNamesNotIncluded,
)
.filterByText(SETTINGS.postSettings.filterText)
if (targetAnkerNumber !== null) {
const r = _TextCsvCursors.takeNextRowTextAsReply(targetAnkerNumber);
messageDisplay(`返信対象有り。アンカー先: ${targetAnkerNumber}`);
return {
...r,
updatedLoopStatuses:
_LoopStatuses.updateMinAnker(targetAnkerNumber),
};
}
}
if (SETTINGS.postSettings.noAnkerPost) {
//返信対象無し、或いは返信しない設定の場合。アンカー無し投稿文を作る。
const r = _TextCsvCursors.takeNextRowTextAsNoAnker();
messageDisplay('返信対象無し。アンカー無し投稿。');
return {
...r,
updatedLoopStatuses: _LoopStatuses,
};
}
return null;
})();
if (p) {
//投稿。
nickname: SETTINGS.nameSettings.nickname,
korokoro: SETTINGS.nameSettings.korokoro,
area: SETTINGS.nameSettings.area,
}),
SETTINGS.mail,
p.text,
);
//_TextCsvCursorsと_LoopStatusesを更新。
_TextCsvCursors = p.updatedTextCsvCursors;
_LoopStatuses = p.updatedLoopStatuses.incrementPostCount();
`投稿回数: ${_LoopStatuses.currentPostCount()}`,
`minAnker: ${_LoopStatuses.currentMinAnker()}`,
`今回アンカー無し投稿取得行: ${_TextCsvCursors.currentRows().noAnker}`,
`今回アンカー有り投稿取得行: ${_TextCsvCursors.currentRows().reply}`,
]);
} else {
`返信対象が現われるのを待機中...。`,
`投稿回数: ${_LoopStatuses.currentPostCount()}`,
`minAnker: ${_LoopStatuses.currentMinAnker()}`,
`今回アンカー無し投稿取得行: ${_TextCsvCursors.currentRows().noAnker}`,
`今回アンカー有り投稿取得行: ${_TextCsvCursors.currentRows().reply}`,
]);
}
wait(SETTINGS.baseWaitTime + randomRange(0, SETTINGS.waitTimeRange));
}
}
/**
* 投稿処理と投稿結果を見てリトライしたりマクロ終了したり。
* @param {string} serverName サーバー名
* @param {MyPosterName} _MyPosterName
* @param {string} postMail メール
*/
serverName,
postMail,
_MyText,
retryTimes = 0,
) {
const r =
retryTimes === 0
? new ValuesOfPost(serverName, _MyPosterName, postMail, _MyText).post(
postTo5chTread,
)
serverName,
postMail,
_MyText,
).postSubstring(retryTimes, postTo5chTread, postConfirm);
if (r) {
back();
return;
}
wait(7);
const error = createPostErrorMessage().analyze();
messageDisplay(error.message);
if (error.order === 'KILL') {
kill();
} else if (error.order === 'SKIP') {
return;
} else if (error.order === 'TRUNCATE') {
back();
serverName,
postMail,
_MyText,
retryTimes + 1,
);
} else if (error.order === 'WAIT') {
wait(SETTINGS.waitTimeForAvoidingPunishment);
serverName,
postMail,
_MyText,
retryTimes,
);
} else if (error.order === 'LOGIN') {
serverName,
postMail,
_MyText,
retryTimes,
);
}
return;
}
/**
* 現在のIPアドレスに、SETTINGS.ipSettings.avoidTheIpの値が含まれていないことを確認する。含まれていたらマクロを一時停止。
* @returns
*/
function checkCurrentIpNotTheIp() {
openUrl('https://www.cman.jp/network/support/go_access.cgi');
const _IpAdress = createIpAdressFromCMan();
if (_IpAdress.includes(SETTINGS.ipSettings.avoidTheIp)) {
pause('現在のIPに指定した値が含まれていることを確認。');
}
return;
}
/**
* @returns
*/
if (
SETTINGS.postSettings.noAnkerPost === false &&
SETTINGS.postSettings.replyPost === false
) {
return kill('設定エラー。noAnkerPostとreplyPost両方ともfalseになってる。');
}
if (
SETTINGS.postSettings.noAnkerPostTextCsvStartRow < 0 &&
SETTINGS.postSettings.replyPostTextCsvStartRow < 0
) {
return kill(
'設定エラー。noAnkerPostTextCsvStartRowとreplyPostTextCsvStartRow両方とも-1になってる。',
);
}
if (
SETTINGS.postSettings.noAnkerPostTextCsvStartRow === 0 ||
SETTINGS.postSettings.replyPostTextCsvStartRow === 0
) {
return kill(
'設定エラー。noAnkerPostTextCsvStartRow/replyPostTextCsvStartRowの初期値は-1或いは1以上で。',
);
}
}
/**
* 入力フォームを表示して入力されたスレのURLを受け取る。
*/
function openPromptThreadUrl() {
const url = prompt('スレURLを入力');
}
/**
* 開いてるスレのレス全て読み取ってPostListインスタンスを作って返す。
* 重すぎるので使うのやめ。どうやらインスタンスの大量生成が原因な模様。
*/
const posts = window.document.getElementsByClassName('post');
return new PostList(Array.from(posts).map((e) => new Post(e)));
}
/**
* 開いてるスレのレス全て取得してPostDOMListに格納して返す。
* @returns
*/
function createPostDOMList() {
const posts = window.document.getElementsByClassName('post');
for (let index = 0; index < posts.length; index++) {
//HTMLCollectionからElementを1つずつ抽出して配列に。
arrPostDOMList.push(posts.item(index));
}
return new PostDOMList(arrPostDOMList);
}
/**
* 開いてる投稿結果画面に表示されてるエラーを読み取ってPostErrorMessageインスタンスを作って返す。
*/
function createPostErrorMessage() {
window.document
There are many ways to introduce an academic essay or short paper. Most academic writers,
however, appear to do one or more of the following in their introductions:
· establish the context, background and/or importance of the topic
· indicate an issue, problem, or controversy in the field of study
· define the topic or key terms
· state of the purpose of the essay/writing
· provide an overview of the coverage and/or structure of the writing
Introductions to research articles and dissertations tend to be relatively short but quite complex.
Some of the more common moves include:
· establishing the context, background and/or importance of the topic
· giving a brief synopsis of the relevant literature
· indicating a problem, controversy or a knowledge gap in the field of study
· establishing the desirability of the research
· listing the research questions or hypotheses
· providing a synopsis of the research method(s)
· explaining the significance or value of the study
· defining certain key terms
· providing an overview of the dissertation or report structure
· explaining reasons for the writer's personal interest in the topic
Examples of phrases which are commonly employed to realise these functions are listed below.
Note that there may be a certain amount of overlap between some of the categories under which
Establishing the importance of the topic for the world or society
X is a fundamental property of ….
X is fast becoming a key instrument in ….
X is a common disorder characterised by ….
X plays an important role in the maintenance of ….
Xs are the most potent anti-inflammatory agents known.
X is a major public health problem, and the main cause of ….
Xs are one of the most rapidly declining groups of insects in ....
In the new global economy, X has become a central issue for ….
X is the leading cause of death in western-industrialised countries.
Xs are one of the most widely used groups of antibacterial agents and ….
X is increasingly recognised as a serious, worldwide public health concern.
X is an important component in the climate system, and plays a key role in Y.
In the history of development economics, X has been thought of as a key factor in ….
Establishing the importance of the topic for the discipline
DeepLで翻訳してみた
The main issue...the bid price has been reaching ¥80/kWh every day since the beginning of the year.
I can finally get into what I really want to tell you.
The reason why new power companies have stopped accepting bids or have withdrawn from the business is because the days when this JEPX spot market price reaches 80 yen/kWh have been going on and on since the beginning of 2010.
The electricity market is a market. If there is a surplus of electricity, the bid price goes down, and if there is a shortage of electricity, the bid price goes up. The spot market is a blind single-price auction, which means that once a contract price is determined, all market prices are traded at that price. Even if Masuda-san bids 10 yen, if many people bid 20 yen, it will be 20 yen, and if many people bid 5 yen, it will be 5 yen.
And as I said before, if they fail to purchase, the power retailer has to pay the imbalance fee.
Then what happens? Many people think, "I'm going to buy it at the imbalance fee of 80 yen/kWh anyway, so I'll bid 80 yen for it. Here is the URL of Enexchange's website, which shows the spot market price in an easy-to-understand manner.
https://insight.enechange.jp/markets
For March 31, it's in the 20 yen range. That's bright red. It is cheaper than the 80 yen I mentioned earlier.
Imagine this. TEPCO's Standard S plan is 20~30 yen/kWh. You see, what we sell for 20-30 yen, we have to buy for more than 20 yen, or even 80 yen.
How much is the gross profit on something that sells for 25 yen? 8 yen, 5 yen, 3 yen? Let's assume that 90 out of every 100 jobs generate a gross profit of 5 yen, which is a profit of 450 yen. If 10 out of 100 sell at that price, the profit is 550 yen.
450 - 550 = -100.
This is the impact of a spot market price of 80 yen. Imagine if you had a customer base of tens of thousands of dollars, and you have to blow millions of dollars every day for a month. I think you can understand a little bit of the logic behind the suspension of acceptance and shutdown of business.
Of course, calculating the cost of procuring electricity is not this simple. I mean, I can't write about the inside story of procurement in my business because it would violate confidentiality. I wrote what I could find out just from the spot market, where the amounts are visualized by the general public. I didn't tell the whole story, if you think about it. Sorry. It's a title fraud.
Supplement... why is this happening?
To be honest, even as someone in the new power company, I am troubled by this situation. How did this happen? ......
In essence, I think "don't liberalize the infrastructure in the first place" is right. However, to put some position talk into it, I think that the various things that happened in the aftermath of Fukushima and the licking at the Kashiwazaki nuclear power plant were the result of being lenient because it was infrastructure, and I think there is some nuance to that.
However, I don't think that the designers of the system anticipated this level of instability in the power supply when the system was liberalized in April 2004. I was impressed when the supply-demand crunch warning came out. I was like, "This is it! That rumored !!!! Supply and demand crunch alert: !!!!!!!" I was so excited. There's no way there's going to be rolling blackouts! It's about to happen!
However, in the extreme, retailers are wholesalers, and while they are wholesalers, the products they sell are not all that different. How can you make a difference in a commodity like electricity? It is usually impossible. It's hard to add value to a product because it's all about price. Of course it's not impossible. There are plans, decarbonization, optional services, and so on. But there is no difference in the electricity itself. I think it's possible to point out that the reason why various new electric power companies flocked to the market was because hyenas gathered in the industry that was assured of a sweet deal in infrastructure ......, and that's true for a percentage of the population. I think all electric power companies are looking for ways to add value to electricity.
I hope this case will make the market healthier.
Incidentally, there is a new electric power company that is getting a tailwind from this current situation. Where is it? The answer is after the commercial!
三井住友銀行 法人口座のValue DoorにMac M1 (Apple Silicon) でICカード認証ログインするときはFirefoxをRosetta使用モードで起動すればセキュリティデバイスにDNPのモジュールが追加できるようになる。
Finderでアプリケーション - Firefox.appをControlキー押しながらクリック - 情報を見る - Rosettaを使用して開く、で行ける。
素の状態だと「モジュールが追加できません」エラーでDNPSmartCardMinidriverが登録できなくて詰んでたが、Intel動作モードじゃないと使えなかったというオチ
三井住友銀行 法人口座のValue DoorにMac M1 (Apple Silicon) でICカード認証ログインするときはFirefoxをRosetta使用モードで起動すればセキュリティデバイスにDNPのモジュールが追加できるようになる。
Finderでアプリケーション > Firefox.appをControlキー押しながらクリック > 情報を見る > Rosettaを使用して開く、で行ける。
素の状態だと「モジュールが追加できません」エラーでDNPSmartCardMinidriverが登録できなくて詰んでたが、Intel動作モードじゃないと使えなかったというオチ
世界銀行による男女格差の調査で日本の順位が80位から103位に落ちたとのこと。
https://nordot.app/871377521626415104
具体的な内容がわからなかったので、世界銀行が公開しているデータを見てみた。
このリンクから各国別のデータが置かれたページに飛ぶことができる。
日本はこれ
https://wbl.worldbank.org/en/data/exploreeconomies/japan/2022
このページを見るとわかるとおり、得点はMobility, Workplace, Pay, Marriage, Parenthood, Entrepreneurship, Assets, Pensionの8項目がそれぞれ100点満点で評価されており、日本はPayとWorkplaceの評価が特に低い。
というわけで、中身を見ていく。
評価項目が4つあり、日本はそのうちひとつだけが該当している。
NGとなった項目とその理由は以下のとおり(以下、日本語の意味は機械翻訳を参照している。理解が違っていたら教えてほしい)。
質問:Does the law mandate equal remuneration for work of equal value?(法律では、同じ価値の仕事には同じ報酬を与えることが義務づけられているか?)
NG理由:No applicable provisions could be located(該当する規定は見つかりませんでした)
これ、パートタイム労働法、労働契約法、労働者派遣法における同一労働同一賃金の原則は該当しないのかな?男女の話じゃないから?
第四条 使用者は、労働者が女性であることを理由として、賃金について、男性と差別的取扱いをしてはならない。
https://elaws.e-gov.go.jp/document?lawid=322AC0000000049_20200401_502AC0000000013
質問:Can a woman work in a job deemed dangerous in the same way as a man?(危険とされる仕事でも、女性は男性と同じように働けるのでしょうか?)
サブ項目:Jobs deemed hazardous(危険とみなされる仕事)
NG理由:Labour Standards Act, Art. 64-3.2(労働基準法第六十四条の三②)
該当する条文は以下のとおり。
第六十四条の三 使用者は、妊娠中の女性及び産後一年を経過しない女性(以下「妊産婦」という。)を、重量物を取り扱う業務、有害ガスを発散する場所における業務その他妊産婦の妊娠、出産、哺ほ育等に有害な業務に就かせてはならない。
② 前項の規定は、同項に規定する業務のうち女性の妊娠又は出産に係る機能に有害である業務につき、厚生労働省令で、妊産婦以外の女性に関して、準用することができる。
https://elaws.e-gov.go.jp/document?lawid=322AC0000000049_20200401_502AC0000000013
で、この②で準用されている対象は「妊娠中の女性及び産後一年を経過しない女性以外の女性(64条3と合わせると、要は全ての女性ってことかな)」で、業務はどうやらこの2条1,18っぽい。
https://www.mhlw.go.jp/stf/shingi/2r9852000001263j-att/2r985200000126hg.pdf
やったほうがいい…のかな…?
質問:Can a woman work in an industrial job in the same way as a man?(女性でも男性と同じように工業系の仕事ができるのでしょうか?)
サブ項目:鉱業
NG理由:Labour Standards Act, Art. 64-2(労働基準法第六十四条の二)
該当する条文は以下のとおり。
第六十四条の二 使用者は、次の各号に掲げる女性を当該各号に定める業務に就かせてはならない。
一 妊娠中の女性及び坑内で行われる業務に従事しない旨を使用者に申し出た産後一年を経過しない女性 坑内で行われるすべての業務
二 前号に掲げる女性以外の満十八歳以上の女性 坑内で行われる業務のうち人力により行われる掘削の業務その他の女性に有害な業務として厚生労働省令で定めるもの
https://elaws.e-gov.go.jp/document?lawid=322AC0000000049_20200401_502AC0000000013
で、この厚生労働省令はさっきと同じPDFの「女性労働基準規則」の部分かな。
https://www.mhlw.go.jp/stf/shingi/2r9852000001263j-att/2r985200000126hg.pdf
Pay4項目のうち2項目が危険業務・重労働への従事ってことは、世銀はここをかなり重視してるんだと思う。ただ、いまいち意図がピンとこない。
「(特に途上国において)稼げる仕事が男性に限定されていないか」みたいなことなんだろうか…?
こっちは4項目中2項目が該当、残りふたつはNG。
質問:Is there legislation on sexual harassment in employment?(雇用におけるセクシャルハラスメントに関する法律はありますか?)
NG理由:No applicable provisions could be located(該当する規定は見つかりませんでした)
男女雇用機会均等法11条はダメなんだろうか…(長いので条文の本文は省略)
第十一条 (職場における性的な言動に起因する問題に関する雇用管理上の措置等)
第十一条の二 (職場における性的な言動に起因する問題に関する国、事業主及び労働者の責務)
第十一条の三 (職場における妊娠、出産等に関する言動に起因する問題に関する雇用管理上の措置等)
質問:Are there criminal penalties or civil remedies for sexual harassment in employment?(雇用におけるセクシャルハラスメントには、刑事罰や民事上の救済措置がありますか?)
NG理由1:No applicable provisions could be located(該当する規定は見つかりませんでした)
サブ項目2:Civil remedies(民事上の救済措置)
NG理由2:No applicable provisions could be located(該当する規定は見つかりませんでした)
これは直接の規定はなく、不法行為、使用者責任、傷害、名誉毀損などで処理されるっぽい。ここはNGだね。
というわけで、とりあえず大きなところだけ見てみた。
個人的にはなんか釈然としないところがあるけど、まあ判断は読んだ人がそれぞれすればいいと思う。
少なくとも得点だけを見るのとは少し印象が変わるんじゃないかな。
他の項目とか時系列での変化なんかは追えていないので、誰か教えてくれると大変ありがたいです。
ネタ元:https://www.itmedia.co.jp/business/articles/2201/04/news001.html
そもそも消費税の仕組みなんて自分が課税事業者になるまで知らなかったし、ちょっと問題点を考えてみた。
結論を先に書いておく。一番損するのは、取引先が営利事業者である免税事業者。
主に知識産業系においてフリーランスと呼ばれる人たちで、売上1000万円以下の事業主である。
●消費税の仕組み
具体的にイメージすると、僕が10000円の商品を売るとお客さんから消費税1000円を預かる。
ところが僕は10000円の商品の材料を6,000円で仕入れていて、その時に消費税600円を既に払っている。
そのため差額の消費税400円だけを国に収めることになる。
(個人なら確定申告とほぼ同時に消費税の申告をして、銀行から振り込むか指定口座から引き落とされることで納税が完了する)
僕が作り出した付加価値=利益は4000円であるので、内税で考えるとその分の消費税を納めていると見ることもできる。
そのため消費税は付加価値税とも呼ばれる。英語ではVAT(Value Added Tax)という。
専門家に言わせれば日本の消費税とVAT正確には少し違うのだろうけど、
内税で考えるか外税で考えるかという視点の違いと思っていいだろう。
勘違いしやすいが、事業者は消費税を負担していない、預かっているお金を事業者は代理納税をしているだけだ。
ここでいう事業者とは販売先をもつ人、消費者とは販売先を持たない人のことだ。
ところが日本では売上1,000万円に満たなければ消費税免税事業者(以下免税事業者)でいることができる。
その名の通り、免税事業者とは消費税を国に納める必要がないということだ。
免税事業者は上記の例では400円を自分の懐に入れられるので、利益は4400円となる。
そもそも消費税の申告が不要なので、いくら懐に入れたかを税務署が知る方法はないし、おそらく本人も把握していない。
さてこの400円はどこからきたのかというと、もちろん税を負担している消費者だ。
何もしていない人が自動的に10%の利益を得られる、こんな不公平な税制があるだろうか。
●インボイス制導入後に損する人と得する人
インボイス制度とは、課税事業者が方式に従って請求書を発行した場合に限り、仕入れ税控除(先の例で言う-600円)ができるようになるということ。
僕の中でいろいろ検討してみた結果、免税事業者でいることで得をするケースは消費者に直接販売する場合だけ。
消費者は販売者が免税事業者かどうかを気にしないし、預かった消費税を懐に入れていることを知る方法がない。
一番損するケースは、企業などから業務委託を受けているようなフリーランスだ。
それも原価率が低い知識産業系。(そもそも原価率が高い産業は売上1000万円なんて簡単に超えるので問題にならない)
どのように損をするか、具体的に考えてみよう。
企業が免税事業者から6000円で仕入れて消費者に10000円で販売した場合、企業が本来取るべき利益は4000円で、企業の消費税納税額は400円となる。
免税事業者からの仕入れは税控除されないので、消費者から預かった消費税1000円をそのまま納税しなければいけない、仕入6600円(税込)、販売11000円(税込)で、
企業の手元に残るのは4400円、そこから消費税1000円を納税するので企業の利益は3400円になる。
企業からすれば、今まで通りでなんで突然利益が減るのよ、おかしいでしょ、そっち(免税事業者)が悪いんだから、取引継続したいなら仕入れを消費税分安くしろよとなるのは当然だ。
整理しやすいように、同じように6600円(税込)で仕入れて10000円(税込)で売る場合を考える。
インボイス制導入前の免税事業者であれば利益は4400円のはずだが、
課税事業者であっても利益4000円取れるので、それよりも減ってしまっている。
仕方なく免税事業者から課税事業者になったとしても、今まで4400円取ってたのが4000円になるわけで1割減に「見える」
なお、消費税分の値引きを迫るのは独禁法に抵触する。(年に1回公取委から調査書類が送られてくるので、誰でも匿名で事業者名を密告可能だ。)
課税事業者になってもらうか、取引停止かを迫るのは当然だろう。
最後に1割減に「見える」と書いたのは、繰り返しになるが事業者は消費税の負担者ではないからだ。
●正義はどこにあるのか
消費者から「預かった」消費税を懐に入れて自分の収入にしているのだ。
法的には問題ないのでもちろん責めることはできないが、倫理・正義に反している。
倫理とか正義とかいう言葉を用いると炎上してしまいそうで難しい問題ではあるのだけど、
僕は「商売において倫理的に正しい行為」は「関係者が誰も損していないこと」と定義したい。
消費者という言葉の括りが大きすぎるのでイメージしづらいところではあるが、
その分の公共サービス・社会福祉が犠牲になっていると考えられるからだ。
消費者とは、結局のところ日本に居住する自然人全てだ。個人事業主だって飯食って生きてる消費者だ。
(法人は経済活動のための仕組みであって消費することは必須ではない。)
日本の消費税は潜在的なバグがあった状態で、免税事業者がこぞってこれを利用していたような状態だ。
最初は3%だった消費税は今は10%だ。ギってる金額が3倍になってるわけだ。
さらに消費税を上げようと考えると、そろそろこの不公平を放置できなくなったってことではないだろうか。
誤っているものはバグの利用者の意志に関係なく、制度設計側の都合で解消されてしまう。
何が「誤り」なのかを考えるのは個人の美意識(上記の僕の倫理観のようなもの)の問題であり責めることはできないが、
制度をより正しい方向に直すことをバグ利用側が責める道理もない。
しかし、こういう法の抜け穴というのを利用するのは、確かに儲かる。
しかしいつか外されるに違いないハシゴの先にいるのは、リスクでしかない。
早めに儲けをとっていつでも逃げれるようにしておくのが、事業主のしたたかさというものではないだろうか。
適切に税を処理するなら税理士に相談したり顧問契約を結ぶべきだと思う。