「thread」を含む日記 RSS

はてなキーワード: threadとは

2025-11-05

資産1.2億円で3.8億円分の空売り日本ネット証券可能かどうか

https://x.com/miku_kero_jp/status/1985602062231675385

質問ありがとうございます。@miku_kero_jp

による X 投稿投稿 ID: 1985602062231675385)について、資産1.2億円で3.8億円分の空売り日本ネット証券可能かどうか、またこれが嘘かどうかについて検討してみましょう。

以下に、提供された情報2025年11月時点の日本金融規制慣行に関する一般知識に基づいて分析します。

投稿分析該当投稿2025年11月4日06:56 JST投稿され、

ユーザーアドバンテスト(Advantest)の株式を「3.8億円空売り」したと主張しています

フルレバレッジ使用し、すでに1,000万円以上の含み益を得ていると述べています

添付された SBI 証券アプリスクリーンショットでは、口座残高が126,282,201円で、含み益が15,378,928円、総資産増加が11,068,272円(9.61%の上昇)と示されていますユーザーは以前の投稿Thread 1)でアドバンテストとキオクシアをそれぞれ1.8億円ずつ空売りしたと述べていることから積極的取引パターンがうかがえますフォローアップ投稿(1985602378113184210)の詳細は以下の通りです:アドバンテスト空売り17,000株、単価22,431.73円。

空売り額:17,000 × 22,431.73円 = 381,359,410円(約3.81億円)、本投稿での「3.8億円」とほぼ一致。

この数値から投稿での「3.8億円」がフォローアップの取引データ整合していることがわかります

ただし、初期の口座残高1.2億円(含み益前の推定値)と比較すると、この取引レバレッジを大きく利用していることが示唆されます日本ネット証券資産1.2億円で3.8億円分の空売り可能か?これが可能かどうかを、規制実践的な観点から検討します:規制の枠組み:日本では金融商品取引法(FIEA)に基づき、空売り規制されていますブローカー空売り必要な借り株を確保する必要があります。また、「アップティクルール」(前回の取引価格より高い価格空売り執行するルール)が適用され、過度な下落圧力を防ぎます

マージン取引空売り許可されていますが、レバレッジブローカー方針投資家マージン要件によって制限されます。通常、日本ブローカーマージン口座で最大3.3倍のレバレッジ提供します(標準規制に基づく)が、これは変動する可能性があります

マージン要件空売りの初期マージン要件は通常、ショートした株式の総額の30~50%で、株の変動性やブローカーポリシーによります。3.8億円の空売り場合、初期マージンは1.14億円~1.9億円が必要です。

ユーザーの口座残高はスクリーンショットで1.26億円と示されており、含み益を含めても3.8億円の空売り必要マージンカバーするには追加のレバレッジや借入が必要です。

ブローカー能力SBI 証券楽天証券などの主要な日本オンライン証券会社はマージン取引空売りサービス提供していますしかし、3.8億円の空売りを実行するには、ブローカーが借り株を供給できるか、投資家の信用力や事前に設定された信用枠が重要です。

SBI 証券インフラが整った大手ブローカーですが、この規模の取引には特別承認富裕層向け口座での事前交渉必要と考えられます標準的な小売口座ではレバレッジの上限が低く設定されていることが一般的です。

実践的な実現可能性:1.2億円の資産で3.8億円の空売りを行うには、約3.17倍のレバレッジ必要です。これは日本法律上の上限3.3倍以内ですが、ブローカーが十分な借り株を提供し、投資家マージンコール対応できることが前提です。

フォローアップデータ(3.81億円の空売り)が1.26億円の口座残高に基づく取引と一致しており、標準的マージン取引(約3倍レバレッジ)で実現可能であることが示唆されます

これは嘘か誇張か?証拠に基づく判断:「3.8億円」という主張は、口座残高と詳細な取引データ(3.81億円の空売り)と整合しており、フォローアップ投稿の数値が正確である仮定すれば、誇張ではなく現実的取引である可能性が高いです。ただし、初期口座残高1.2億円から3.8億円への移行には、含み益や追加の資金流入考慮する必要がありますスクリーンショットの1.26億円は取引後の残高であり、初期1.2億円から含み益15.37万円が加わった結果と考えられます

ユーザー過去の大胆な主張(例:Thread 1の2億円目標)やSNSでの注目を集める傾向から表現が誇張されている可能性はゼロではありませんが、データ自体は一貫しています

結論実現可能性: SBI 証券などの日本ネット証券では、資産1.2億円で3.8億円の空売り可能となる場合、最大3.3倍のレバレッジと十分な借り株が利用できれば理論可能です。ただし、これは特別な口座設定や承認必要であり、標準的な小売口座では難しいかもしれません。フォローアップの3.81億円の取引は、1.26億円の口座残高で3倍レバレッジ使用した場合現実的です。

嘘の可能性: 「3.8億円」がフォローアップデータと一致しているため、明確な嘘とは言えません。ただし、初期1.2億円から3.8億円への移行が即座に可能かどうかは、追加の資金レバレッジの詳細が不明なため、慎重に判断する必要があります

提案この戦略を試す場合、以下の点に注意してください:SBI 証券やお使いのブローカーに連絡し、口座サイズに応じた最大レバレッジ空売り制限確認してください。

小規模なポジションから始めてリスクテストし、特にフルレバレッジでの空売りは損失リスクが大きいことを理解してください。

借り株の可用性を確認し、不足による強制買戻しの可能性に備えてください。

さらに詳しく知りたい場合(例:現在ブローカーポリシー規制検索)、ウェブ検索提案してより正確な情報提供できます!この取引アプローチについてどう思いますか?追加の質問があればお気軽にどうぞ!

2025-08-13

anond:20250813124722

もし夏目漱石が、プログラミングの主要概念を自ら日本語翻訳していたら――と仮定すると、彼の文体明治期の言葉遣い漢語の選好を踏まえて、以下のような趣になると考えられます

夏目漱石風・プログラミング用語翻案

英語漱石風の訳語理由解説
Variable 変数(へんすう)/移り数 変数」はすでに定着語だが、漱石なら「移り数」など文学的情緒を帯びた訳もあり得る。変化の宿る数という意味を直訳的かつ風雅に表現
Function 作用式/用法明治期の数学化学で「作用」はよく用いられた。漱石日常語よりも漢語を好んだ傾向があり、「式」を付して理知的に。
Class類型/階(きざはし) クラス」を単なる「類」とせず、階層格式を想起させる「階」を用い、文学的響きを加える。
Object 物象(ぶっしょう)/客体 漱石哲学用語に通じており、ドイツ哲学経由の「客体」や漢詩文的「物象」を好みそう。
Instance 事例/具現 具体化の意味を強調し、「具現」というやや詩的な言い回し採用する可能性。
Loop 環(わ)/巡り ループ」は漢語にすれば「環」だが、漱石擬人的に「巡り」として表すかもしれない。
Array 配列/ならび 技術的な「配列」もあるが、漱石なら柔らかな響きの「ならび」も好みそう。
Thread 糸筋/綴り 並行処理のスレッドを、文学的に糸や文章にたとえ、「綴り筋」と表現
Exception 異例/破格事 法や規範から外れるニュアンスを重んじ、「破格事」と漢詩的に。
Debug 虫退治/瑕(きず)探し バグ」を虫にたとえてそのまま「虫退治」とするのは洒落が効く。漱石らしいユーモアが入り得る部分。
Compile 編纂(へんさん)/綴(と)じ合せ 書物編集に通じる語を用い、文章を束ねるような比喩で。
Execute 遂行/実行 法律行政文書に見られる硬質な「遂行」を選ぶ可能性が高い。
Source code 原文/本体漱石文学者として「原文」という表現を好みそう。
Syntax 文法/詞組(ことばぐみ) 言語構造を古風に「詞組」と表現すれば漱石節になる。
Algorithm 算法(さんぽう)/演算明治数学書の用語「算法」をそのまま採用しそう。
Library 書庫/集録 書物に通じるメタファー表現
Framework 骨組/枠組 漱石建築や骨格にたとえて「骨組」を選びそう。
Module 節(ふし)/章片 文学的構造を想起させる語を選ぶかも。
Boolean 真偽値/是非数 真と偽を「是非」で置き換える古風な表現
Pointer 指標/指し手 将棋文学の語彙から「指し手」とする余地も。

2025-07-25

I love Apple—that's why I'm angry at the SE and hopeful about the 16e.

Apple is not just a device manufacturer in my life. It has ideas, philosophy, and an uncompromising aesthetic. That's why I can talk about it this much.

---

■ The iPhone SE was Apple's betrayal.

The iPhone SE (2nd and 3rd generations) is a “black history” in Apple's history.

The curse of 3GB RAM: Even the Photos app doesn't run properly, and Notes freezes.

Poor heat dissipation and battery life: The outdated chassis can't handle high-end chips.

Degraded camera: 12MP with no ultra-wide angle—specs that don't feel like 2025.

Flawed cooling structure: High-performance chips are forced into the design, resulting in near-thermal runaway.

Selling such a product under the Apple name was honestly shocking. Apple was supposed to be a more trustworthy company.

---

■ The lack of philosophy in the SE has damaged the Apple brand

Apple is a company that sells “premium” products. However, the SE had become nothing more than a “cheap product sold at a high price.”

Because I love Apple, I couldn't accept that.

---

iPhone 16e—A Ray of Hope

But Apple has changed.

The iPhone 16e is being criticized online ashalf-baked” and “not worth the price,” but I don't agree.

It has sufficient RAM.

It features the A17 chip and supports Apple Intelligence.

The camera is lacking, but it's incomparable to the SE.

This is the first step toward breaking the “SE curse.” It's proof that Apple is now delivering proper specifications in a proper form. Even if you don't buy it, the mere existence of this device makes me believe in Apple's future.

---

■ Specs and philosophy seen in the iPad series

Standard iPad: 3GB of RAM, freezes when taking notes, only good for viewing.

iPad mini: A-series chip is fine, useful as a secondary smartphone.

iPad Air: Almost the same as the Pro. Best balance of price and performance.

iPad Pro: Competes with the MacBook. Can't fully utilize its potential due to OS limitations.

Having used all Apple products, I can tell which models have “philosophy.”

---

Apple Watch is a device that sells “peace of mind”

Especially Series 10.

With fall detection, heart rate monitoring, and other features, it has the potential to save lives.

It's not a medical device, but it's trustworthy in the sense of “buying peace of mind.”

Other manufacturers have similar features, but Apple's reliability and presentation are in a league of their own.

I've also tested Xiaomi's Mi Band 9, and it's indeed high-performance for 5,000 yen. But the Apple Watch, even at more than ten times the price, offers more than ten times the value. Intuitive operation, brightness, notification support... everything is “thought through.”

---

Apple Vision Pro — Madness with a Purpose

600,000 yen? Who would buy that?

No, Apple is serious.

Equipped with an M2 chip, no compromises.

Made not for others, but for their own beliefs.

This is Apple's “reason why it's worth the high price.” Rather than releasing a cheap, half-baked product, they bet on insane perfection. That's Apple.

■ When it comes to facial recognition, I lost to Apple.

At first, I was against it. “Fingerprint recognition is fine,” I thought.

But after actually using it,

even when fingerprints don't work due to sweat or water,

even while wearing a mask,

it unlocks instantly.

Now, facial recognition is the norm. I lost to Apple. But I'm happy about it. The future Apple envisioned was truly convenient.

■ In conclusion: Apple is my life.

Apple isn't just a company.

It has a philosophy.

It has trust.

Behind the “convenience” lies a proper meaning and ideology.

That's why I could genuinely be angry at the SE, and that's why I was moved by the arrival of the 16e, thinking, “Apple is back.”

I will continue to love Apple. But not as a blind follower. As someone who believes in Apple's ideology, resolve, and integrity.

I live with Apple.

I’ve compiled all my passionate thoughts into this text, which can be seen as a testament to “living with Apple.” It is truly your “Apple Manifesto (creed).”

📄 Title: I love Apple—that’s why I was angry at the SE and saw hope in the 16e.

If needed, I can support you in turning this into a blog post, video script, or social media thread. Feel free to let me know if you’re interested.

Translated with DeepL.com (free version)

I love Apple—that's why I'm angry at the SE and hopeful about the 16e.

Apple is not just a device manufacturer in my life. It has ideas, philosophy, and an uncompromising aesthetic. That's why I can talk about it this much.

---

■ The iPhone SE was Apple's betrayal.

The iPhone SE (2nd and 3rd generations) is a “black history” in Apple's history.

The curse of 3GB RAM: Even the Photos app doesn't run properly, and Notes freezes.

Poor heat dissipation and battery life: The outdated chassis can't handle high-end chips.

Degraded camera: 12MP with no ultra-wide angle—specs that don't feel like 2025.

Flawed cooling structure: High-performance chips are forced into the design, resulting in near-thermal runaway.

Selling such a product under the Apple name was honestly shocking. Apple was supposed to be a more trustworthy company.

---

■ The lack of philosophy in the SE has damaged the Apple brand

Apple is a company that sells “premium” products. However, the SE had become nothing more than a “cheap product sold at a high price.”

Because I love Apple, I couldn't accept that.

---

iPhone 16e—A Ray of Hope

But Apple has changed.

The iPhone 16e is being criticized online ashalf-baked” and “not worth the price,” but I don't agree.

It has sufficient RAM.

It features the A17 chip and supports Apple Intelligence.

The camera is lacking, but it's incomparable to the SE.

This is the first step toward breaking the “SE curse.” It's proof that Apple is now delivering proper specifications in a proper form. Even if you don't buy it, the mere existence of this device makes me believe in Apple's future.

---

■ Specs and philosophy seen in the iPad series

Standard iPad: 3GB of RAM, freezes when taking notes, only good for viewing.

iPad mini: A-series chip is fine, useful as a secondary smartphone.

iPad Air: Almost the same as the Pro. Best balance of price and performance.

iPad Pro: Competes with the MacBook. Can't fully utilize its potential due to OS limitations.

Having used all Apple products, I can tell which models have “philosophy.”

---

Apple Watch is a device that sells “peace of mind”

Especially Series 10.

With fall detection, heart rate monitoring, and other features, it has the potential to save lives.

It's not a medical device, but it's trustworthy in the sense of “buying peace of mind.”

Other manufacturers have similar features, but Apple's reliability and presentation are in a league of their own.

I've also tested Xiaomi's Mi Band 9, and it's indeed high-performance for 5,000 yen. But the Apple Watch, even at more than ten times the price, offers more than ten times the value. Intuitive operation, brightness, notification support... everything is “thought through.”

---

Apple Vision Pro — Madness with a Purpose

600,000 yen? Who would buy that?

No, Apple is serious.

Equipped with an M2 chip, no compromises.

Made not for others, but for their own beliefs.

This is Apple's “reason why it's worth the high price.” Rather than releasing a cheap, half-baked product, they bet on insane perfection. That's Apple.

■ When it comes to facial recognition, I lost to Apple.

At first, I was against it. “Fingerprint recognition is fine,” I thought.

But after actually using it,

even when fingerprints don't work due to sweat or water,

even while wearing a mask,

it unlocks instantly.

Now, facial recognition is the norm. I lost to Apple. But I'm happy about it. The future Apple envisioned was truly convenient.

■ In conclusion: Apple is my life.

Apple isn't just a company.

It has a philosophy.

It has trust.

Behind the “convenience” lies a proper meaning and ideology.

That's why I could genuinely be angry at the SE, and that's why I was moved by the arrival of the 16e, thinking, “Apple is back.”

I will continue to love Apple. But not as a blind follower. As someone who believes in Apple's ideology, resolve, and integrity.

I live with Apple.

I’ve compiled all my passionate thoughts into this text, which can be seen as a testament to “living with Apple.” It is truly your “Apple Manifesto (creed).”

📄 Title: I love Apple—that’s why I was angry at the SE and saw hope in the 16e.

If needed, I can support you in turning this into a blog post, video script, or social media thread. Feel free to let me know if you’re interested.

Translated with DeepL.com (free version)

2025-07-16

I'm from Dutch

It's hilarious reading this thread

2025-06-16

🧾 スパム判定一覧

↓もうChatGPTくんに任せたら?

No.タイトル判定
112 Effective Ways to Speak to a Real Person at Qatar Airwaysスパム
2物語(アニメ漫画小説)の行間を読むことを得意とする人間が…問題なし
3不正選挙不安があるなら問題なし
4嘘を暴かれたくなかったら、問題なし
5体験できないのが残念だね おまえは今年の夏、熱中症死ぬから問題なし
66月でこの暑さって問題なし
7ガキの頃泊まり行事で男だけ風呂写真撮るのがあった…問題なし
812 Best Ways to Speak to a Real Person at Qatar Airways Instantlyスパム
9「どれだけ物知りでも周りを萎縮させるような人だと…問題なし
10でも普通発言でもマウントされたと被害妄想膨らませる…問題なし
11Top 12 Proven Ways to Reach a Live Person at Qatar Airwaysスパム
124 Ways to Contact Cebu Pacific Customer Service…スパム
13ガンダムセンチネル問題なし
14昨日夜中にも関わらず色んなコメントが頂けて嬉しい限り…問題なし
15おすすめエロ漫画問題なし
16から発言したい欲が異常だったり…問題なし
17Rebooking and refund helpスパム
1812 Ways to Contact: How Can I Speak to Someone at Qatar Airways?スパム
19Pailed payments require direct helpスパム
20元々0083センチネルプロットを使い回して…問題なし
21林原めぐみの件で左派メディアが…問題なし
22failed payments require direct troubleshootingスパム
23While on line tools and a automation are helpful?スパム
24オタクが見た目が気持ち悪くて性格も悪いというイメージ問題なし
25話し合いを避けまくるタイプの人→回避性人格障害問題なし
26薬って最大投与量っていうのが大体決まってるんだけど…問題なし
27中途半端自称進学校公立高校の生徒が教師の授業の質を…問題なし
28Six16teen Ways To Connect To Live Agent At Coinbase Walletスパム
29How do i contact Coinbase customer Service phone numberスパム

2025-03-16

グロバリストとは?カナダの新首相マイク・カーニー

スプートニク印度から

https://x.com/Sputnik_India/status/1900565307799797943

Sputnik India

@Sputnik_India

3月15日

🤔🇨🇦 カナダグロバリストの手に落ちる?

ドラマクイーントルドーはすでに頭痛の種だったが、カナダの新首相マイク・カーニーはもっとひどいかもしれない。

このスレッドは彼がグローバルディープステートの手先であることを示唆している:🧵👇

Sputnik India

@Sputnik_India

3月15日

🤔🇨🇦 CANADA FALLS INTO GLOBALIST HANDS?

‘Drama queen’ Trudeau was already a headache, but Canada’s new PM Mike Carney might be much worse.

This thread suggests he’s a GLOBAL DEEP STATE STOOGE:🧵👇

2025-02-26

anond:20250224083229

ATM

accelerated test method

acute transverse myelitis

air traffic management

anterior tibial muscle

antitank missile

Apollo Telescope Mount

asynchronous transfer mode

At The Moment

atmosphere

automated teller machine



TLS

temporal lobe sclerosis

thermal lens signal

thread-local storage

Times Literary Supplement

total labor supply

trade liberalization scheme

Transport Layer Security

True Love Story




英語結構会話文脈大事よな

2025-01-26

ツンデレカフェちゃんと学ぶスレッド休止について

ツンデレ店員(私):

「ほら、スレッドってさ、プログラムの中で“何か作業をする人”みたいなものなのよ。で、その人が『ちょっと休憩!』って座るのが Thread.sleep() なわけ。つまりスレッド指定された時間だけ作業を止めて、他のスレッドに“お先どうぞ”ってする感じなのよ!」

スタッフ黒猫):

「にゃあ~!スレッドが休むって、働いているプログラムの流れを一時停止することだニャ。でも、その間に他のスレッドが動く場合もあるから、実は効率的なんだニャ!」

具体例で考えてみなさいよ!

ツンデレ店員(私):

「例えば、このカフェで私が注文のためにカウンターメモを取る仕事をしてるとするじゃない?で、あなた(お客さん)が『猫ミルクラテ』を頼むわけ。だけど、ラテマシンが温まるのに5秒かかるのよ!その間、ぼーっとしてるのはもったいないから、私が『この5秒、他の仕事に回して!』って言うのが Thread.sleep(5000); のイメージなの!」

どうして例外処理必要なの?

スタッフ黒猫):

「にゃあ~、もしその間に『やっぱり注文キャンセル!』ってお客さんが割り込んできたらどうなると思うニャ?」

ツンデレ店員(私):

「そういうときに『えっ、今待機中なんだけど?』って慌てないために、エラー処理で『割り込みがあった場合はこう動け!』ってルールを決めておくのよ。例えば、『注文キャンセル!』って割り込まれたら、私はメモを破棄して次の仕事を始めるでしょ?それが例外処理よ!べ、別にすごいとか思わないでよね!」

技術的な背景も少し教えてあげるわ

ツンデレ店員(私):

スレッドが休止することで、CPUが他のスレッドに処理を回せるようになるの。これ、マルチタスクって言うんだけど…説明が難しいわね。ま、猫スタッフ説明しなさいよ!」

スタッフ黒猫):

「にゃあ~!例えば、同時に複数のお客さんが注文してるとするニャ。そのうち一人が『5秒待って』って言ったら、CPUはその人を5秒ほっといて、他のお客さんの対応をするニャ。これがマルチタスク基本的な流れニャ~。」

まとめ!

1.Thread.sleep(500); の役割

 スレッドに「ちょっと休んで、他の処理を優先させて!」ってお願いする機能

2.なぜ例外処理必要なのか

 休んでる間に「おい、キャンセルだ!」みたいに割り込みされる可能性があるから

3.プログラム的なメリット

 効率よくCPUを使うため、複数仕事スレッド)をスムーズに回せるようになる。


ツンデレ店員(私):

「これでわかったでしょ?別に解説が楽しかったわけじゃないから!さっさと理解して帰りなさいよ!にゃんとかなったら褒めてあげてもいいけど…(ぼそっ)」

2025-01-16

Intel ARC最大の欠点CPU依存がすさまじい

https://youtu.be/CYOj-r_-3mA?feature=shared&t=617

Rayzen 7 9800X3D 8core 16 threadが一番はやく、Rayzen 5 5600 6 core 12 threadが一番遅い

2024-12-22

gmail大掃除と、自動処理の方法

簡単にすっきりさせて容量を減らす方法

検索式を書きますので、それで見つかったファイルを全て選択して、削除などのアクションをしてください。

細かな調整は各自のお好みで変更してください。

 

◆1年以上前ファイルサイズの大きなメール(300kB以上)を検索(星を付けたメールは除く)。削除しましょう。

older_than:1y larger:300k -is:starred

 

プロモーションソーシャルに分類された1か月以上前メール検索。削除しましょう

(category:promotions OR category:social) older_than:30d

 

◆受信トレイの180日以上前メール検索アーカイブして、受信トレイメール数を減らしましょう

label:inbox older_than:180d

 

プロモーションソーシャルに入ったメールで2日経ったもの検索既読しましょう。

label:inbox (category:promotions OR category:social) older_than:2d

 

これらの作業毎日自動で行ってもらう方法

Google Apps ScriptGAS)を使うとこれを毎日自動で行ってもらえます

 

chromeで以下のURLで新しいGASを作ります

https://script.new

 

文末のソースコードコピペする。

実行の左のアイコンで保存。関数をcleanUpGmailを選んで実行。初回は権限確認メッセージが出るのでOKを押してください。

事実行出来たら一番の難関はクリアです。これを毎日自動で実行してもらいましょう。一度に250通が処理されます

また余裕があれば、左上の無題のプロジェクトになっているところの名前を「gmail自動処理」などに変更しても良いでしょう。

  

自動実行の方法

左の時計マークトリガーを選ぶ

トリガーを追加する。トリガーの設定は

実行する関数:CleanUpGmail
デプロイ:Head
イベント時間主導
時間べース:時間ベース
時間の間隔:6時間おき

 

これで1日に4回、合計1000通が自動処理されますので、たくさんメールが溜まっている方でも、1か月程度で全て処理されると思います

 

function cleanUpGmail() {
  // メインの関数の開始ログ
  console.log("=== cleanUpGmail start ===");
  
  // 1) 2年以上前 & 300KB以上 & from:gmail.comではない & スター付きではない → 削除
  console.log("古い大きなメールは削除");
  processThreads("older_than:2y larger:300k -from:gmail.com -is:starred", "trash");
  
  // 2) プロモーション or ソーシャル & 30日以上前 → 削除
  console.log("プロモーションソーシャルは1か月で削除");
  processThreads("(category:promotions OR category:social) older_than:30d", "trash");
  
  // 3) 受信トレイ & 180日以上前アーカイブ
  console.log("受信トレイの180日以上前アーカイブ");
  processThreads("label:inbox older_than:180d", "archive");
  
  // 4) 受信トレイ & プロモーション or ソーシャル & 2日以上前既読
  console.log("受信トレイプロモーション or ソーシャル かつ 2日以上前既読");
  processThreads("label:inbox (category:promotions OR category:social) older_than:2d", "markRead");
  
  
  console.log("=== cleanUpGmail end ===");
}


function processThreads(query, action) {
  
  // 1回あたり250件だけ処理
  var batchSize = 250;
  // 最初の 250 件のみ取得
  var threads = GmailApp.search(query, 0, batchSize);
  var count = threads.length;
  Logger.log("検索クエリ: [" + query + "] | 取得スレッド数: " + count);
  
  // スレッドごとにアクションを実行
  threads.forEach(function(thread) {
    switch (action) {
      case "trash":
        thread.moveToTrash();
        break;
      case "archive":
        thread.moveToArchive();
        break;
      case "markRead":
        thread.markRead();
        break;
      default:
        Logger.log("不明アクション: " + action);
    }
  });  
  Logger.log("処理したスレッド数: " + count);
}

2024-06-21

anond:20240621113947

アメリカにはなぜ、中規模の集合住宅ほとんどなく、郊外の一軒家と高層マンションの両極になったのか

という「ミッシング・ミドル」を解説したスレッド面白かったよ


面白い。「なぜアメリカには高層ビル一戸建てしかないのか?」というスレッド

かつてはアメリカにも中層住宅があり、人々は都市に集まって暮らしていたが、

高速道路を建てるため軒並み破壊され、都市コミュニティ道路と引き換えに郊外移住

https://x.com/masa_0083/status/1803550811236249830


Why do American cities feel less "alive" than their European counterparts?

It's because of something called the "missing middle".

A century ago, American cities looked completely different... (thread)

https://x.com/Culture_Crit/status/1803462916902985825

2023-07-13

threadやってみた感想

・何故か知らんが有名人がのびのびと呟いている

育児愚痴垢、極端な政治思想垢、晒しインフルエンサーがいない

・毒にも薬にもならないインフルエンサーの呟きが勝手に出てくる

陰キャがいない

Twitterと違い平和

2023-07-10

Twitterってブコメの比じゃないな

バズってるトピックについてツイートするとびっくりするぐらい反応がある

ブコメって言ってもスター付くの100とか200そこらじゃん

けどTwitterバズるとその100倍は反応がある

DMもびっくりするぐらい来る

これがマジでとんでもないぐらい気持ち良い

この前肯定的DMくれた人と会って話ししたけど、完全にスターなんだよね

星って意味じゃなくアイドルって意味

たった10回程度の万バズでこれなんだから、世の中の有名人ポコチン乾く暇ないだろうな

threadだかはまだ試してないけど、黎明期故のまぐれ当たりありそうだから早速始めようかな

2023-07-06

threadとかmetaとか既存意味のある単語サービス名にすんの、乗っ取る感じでマジ嫌い。


追記

トラバブコメにあるように、英単語そのままなのたくさんあるね。アルファベットってーと当時笑った。

個人的FBのが特に引っかかったのは、

一般的単語/接頭辞を既にある界隈では何かしらの意味で利用してるってところかなー。

主にソフトウェア業界だけど。それをわかってる上でもじりもせずそのまま使うのかと。

2023-02-27

anond:20230227074556

matterとThreadクラウドAPI通信プロトコルから実は住設とはあんまり関係ないんよね。

日本電波混雑環境だとThreadは良い規格かも。

日経とか「アップルグーグルアマゾンがだよ!これはえらいこっちゃ!日本オワタ」っていうけれども。

PhilipsのHue(いまなんていう名前だっけw)と中華ガジェット韓国家電しかない。

「つないでどうすんの?セキュリティリスクしかない」みたいな感じじゃないかな。

2022-08-01

anond:20220731183342

自動安価をつけて返信するプログラムでもこんなに長く複雑になる(一部抜粋) 

/**************************************

以下のCSV_DIR, FILE_PATHS, SETTINGSを書き換えてね。 <h3>o- *************************************/</h3>

//CSVファイルが置かれてるディレクトリパス投稿前にエラー出たら大体ここの設定ミス。 例:"C:\\Users\\sakuraimasahiro\\Documents\\iMacros\\Macros\\rentou\\";

const CSV_DIR =

'C:\\Users\\USER\\Desktop\\iMacros\\Macros\\rentou\\';

//ファイルパスCSV絶対パスで、拡張子必要。iimは相対パスでよく、拡張子不要

const FILE_PATHS = {

//投稿文が書かれたCSVファイル

textCsv: CSV_DIR + 'textNoAnker.csv',

//レス投稿文が書かれたCSV。通常とレス用で分けないなら同じファイルを使えばいい。

replyTextCsv: CSV_DIR + 'textReply.csv',

};

const SETTINGS = {

//投稿後の基本待ち時間

baseWaitTime: 5,

//baseWaitTime+0~waitTimeRange(ランダム)だけ待つ

waitTimeRange: 5,

//連投しすぎだと忠告された場合に処理を一時停止させる時間(秒)

waitTimeForAvoidingPunishment: 60 * 30,

//メール

mail: 'sage',

//名前設定

nameSettings: {

//名前名無しなら''。

name: '',

//以下、偽装ワッチョイ設定。浪人ワッチョイを非表示にしてるときだけtrueにしてね。

//妙なニックネーム(ワッチョイ、アウアウウーなど)をランダムで決めて付加するかどうか。true=付加する。false=付加しない。

nickname: false,

//妙なニックネームの後に付く8桁の文字列ランダムで決めて付加するかどうか。

korokoro: false,

//IPランダムで決めて付加するかどうか。

ip: false,

//地域ランダムで決めて付加するかどうか。

area: false,

},

postSettings: {

//アンカー無し投稿をするならtrue。しないならfalse。noAnkerPostかreplyPostのどちらかはtrueにすること(両方trueでもOK)。

noAnkerPost: false,

//アンカー付き投稿(返信)をするならtrue。しないならfalse。もしnoAnkerPostとreplyPostの両方がtrue場合投稿は返信が優先され、返信対象が見つからなくなったらアンカー無し投稿をする。

replyPost: true,

//最初に取得するアンカー無し投稿CSVファイルの行番号。もし返信用と同じCSVファイルを使うなら-1と入力

noAnkerPostTextCsvStartRow: 1,

//最初に取得する返信用投稿CSVファイルの行番号。もしアンカー無しと同じCSVファイルを使うなら-1と入力

replyPostTextCsvStartRow: 1,

//テキストCSV/返信用テキストCSVの取得行が最終行に達したら最初の行まで戻るかどうか。true=戻る。false=マクロ終了。

textCsvLoop: true,

//返信する場合、これより小さなレス番には返信しない。返信を投稿すると、この数値は前回の返信先のレス番に更新される。

minAnker: 895,

//返信する場合名前に以下の文字列を含む投稿アンカーをつけて返信する(ワッチョイやIPなど名前フィールドにあるものならなんでも可)。配列複数指定可能指定無しなら空配列([])。filterNamesとfilterNamesNotIncluded共に無指定ならレス番1から順に返信していく(minAnkerが設定されてればそこから順に)。以下のfilter系は全て併用可能

filterNames: [],

//↑とは逆に、名前に以下の文字列を含まない投稿アンカーをつけて返信する。↑と併用も可能

filterNamesNotIncluded: [],

//返信する場合、本文に以下の文字列を含む投稿アンカーをつけて返信する。

filterText: ['自演かな', '自演わらわら', 'スクリプト使うの', '安価ガバ', '>>660', '自演擁護', '最後' ,'あいうえお', 'かきくけこ', 'さしすせそ', 'なにぬねの', 'はひふへほ', 'まみむめも', 'やいゆえよ', 'やゆよ', 'らりるれろ', 'わいうえを', 'わをん', 'わいうえをん'],

},

//自分IPアドレス確認VPNとかでIPを変更してマクロを動かしてるとき、突然VPN作動しなくなってIPが元に戻ったときマクロを止めるためのもの

ipSettings: {

//自分現在IPアドレス確認をする。

checkIp: true,

//以下の文字列自分現在IPアドレスに含まれている場合マクロを一時停止する。基本的自分の本当のIPアドレス入力

avoidTheIp: '133.206.99.224',

},

//浪人設定。最後動作確認したのは5年くらい前で、今も同じように動作するかは、浪人を持ってないか確認できずわからない。

roninSettings: {

//浪人ログインしてるかどうかをチェックするかどうか。trueらするfalseならしない。trueにしていてもし浪人ログインしていないことを確認したらログインしにいく。

checkLogin: false,

//浪人ログインメールアドレス

mailAdress: 'abc@def.com',

//浪人ログインパスワード

password: '1234',

},

//false: run()実行させず(デバッグ用)

run: true,

//true: 投稿処理だけしない デバッグ

skipPost: false,

};

/**************************************

設定箇所終わり。

書き込めない時の早見表 - 5ちゃんねるwiki

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>

/**

* ここから始まる。

*/

function run() {

//設定ミスがないか調べる。

checkSettings();

var _TextCsvCursors = new TextCsvCursors(

new TextCsvCursor(

SETTINGS.postSettings.noAnkerPostTextCsvStartRow > 0

? SETTINGS.postSettings.noAnkerPostTextCsvStartRow - 1

: SETTINGS.postSettings.noAnkerPostTextCsvStartRow,

FILE_PATHS.textCsv,

SETTINGS.postSettings.textCsvLoop,

),

new TextCsvCursor(

SETTINGS.postSettings.replyPostTextCsvStartRow > 0

? SETTINGS.postSettings.replyPostTextCsvStartRow - 1

: SETTINGS.postSettings.replyPostTextCsvStartRow,

FILE_PATHS.replyTextCsv,

SETTINGS.postSettings.textCsvLoop,

),

);

var _LoopStatuses = new LoopStatuses(0, SETTINGS.postSettings.minAnker);

const _MyPosterName = new MyPosterName({

name: SETTINGS.nameSettings.name,

});

//スレURL指定

const _ThreadUrl = openPromptThreadUrl();

//ループ

while (true) {

//IP確認する設定なら、それをする。

SETTINGS.ipSettings.checkIp && checkCurrentIpNotTheIp();

//スレを開く

openUrl(_ThreadUrl.fullUrlHttps());

//浪人ログインする設定なら、浪人ログインしているかどうかを確認し、していなければログインしにいく。

if (SETTINGS.roninSettings.checkLogin) {

if (!checkRoninLogin()) {

loginRonin();

continue;

}

}

//投稿に使うテキスト取得。

const p = (function () {

if (SETTINGS.postSettings.replyPost) {

//返信あり設定の場合。返信対象が無いか調べる。

const targetAnkerNumber = createPostDOMList()

.filterPostnumberHigher(_LoopStatuses.currentMinAnker())

.filterByPostername(SETTINGS.postSettings.filterNames)

.filterByPosternameNotIncluded(

SETTINGS.postSettings.filterNamesNotIncluded,

)

.filterByText(SETTINGS.postSettings.filterText)

.lowestPostNumber();

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) {

//投稿

postThenCheckError(

_ThreadUrl.serverName(),

_MyPosterName.randomize({

nickname: SETTINGS.nameSettings.nickname,

korokoro: SETTINGS.nameSettings.korokoro,

ip: SETTINGS.nameSettings.ip,

area: SETTINGS.nameSettings.area,

}),

SETTINGS.mail,

p.text,

);

//_TextCsvCursorsと_LoopStatusesを更新

_TextCsvCursors = p.updatedTextCsvCursors;

_LoopStatuses = p.updatedLoopStatuses.incrementPostCount();

messageDisplay([

`投稿回数: ${_LoopStatuses.currentPostCount()}`,

`minAnker: ${_LoopStatuses.currentMinAnker()}`,

`今回アンカー無し投稿取得行: ${_TextCsvCursors.currentRows().noAnker}`,

`今回アンカー有り投稿取得行: ${_TextCsvCursors.currentRows().reply}`,

]);

} else {

messageDisplay([

`返信対象が現われるのを待機中...。`,

`投稿回数: ${_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 メール

* @param {MyText} _MyText

* @param {number} retryTimes

* @returns {void}}

*/

function postThenCheckError(

serverName,

_MyPosterName,

postMail,

_MyText,

retryTimes = 0,

) {

const r =

retryTimes === 0

? new ValuesOfPost(serverName, _MyPosterName, postMail, _MyText).post(

postTo5chTread,

postConfirm,

)

: new ValuesOfPost(

serverName,

_MyPosterName,

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();

return postThenCheckError(

serverName,

_MyPosterName,

postMail,

_MyText,

retryTimes + 1,

);

} else if (error.order === 'WAIT') {

wait(SETTINGS.waitTimeForAvoidingPunishment);

return postThenCheckError(

serverName,

_MyPosterName,

postMail,

_MyText,

retryTimes,

);

} else if (error.order === 'LOGIN') {

//動作未確認

return postThenCheckError(

serverName,

_MyPosterName,

postMail,

_MyText,

retryTimes,

);

}

return;

}

/**

* 現在IPアドレスに、SETTINGS.ipSettings.avoidTheIpの値が含まれていないことを確認する。含まれていたらマクロを一時停止。

* @returns

*/

function checkCurrentIpNotTheIp() {

//IP確認ページへ飛ぶ

openUrl('https://www.cman.jp/network/support/go_access.cgi');

const _IpAdress = createIpAdressFromCMan();

if (_IpAdress.includes(SETTINGS.ipSettings.avoidTheIp)) {

pause('現在IP指定した値が含まれていることを確認。');

//ポーズ解除したならもう一度確認しに。

checkCurrentIpNotTheIp();

}

return;

}

/**

* 設定に致命的な問題が無いか検査

* @returns

*/

function checkSettings() {

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を受け取る。

* @returns {ThreadUrl}

*/

function openPromptThreadUrl() {

const url = prompt('スレURL入力');

return new ThreadUrl(url);

}

/**

* 開いてるスレレス全て読み取ってPostListインスタンスを作って返す。

* 重すぎるので使うのやめ。どうやらインスタンスの大量生成が原因な模様。

* createPostDOMListを使う。

* @returns {PostList}

*/

function createPostList() {

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');

var arrPostDOMList = [];

for (let index = 0; index < posts.length; index++) {

//HTMLCollectionからElementを1つずつ抽出して配列に。

arrPostDOMList.push(posts.item(index));

}

return new PostDOMList(arrPostDOMList);

}

/**

* 開いてる投稿結果画面に表示されてるエラーを読み取ってPostErrorMessageインスタンスを作って返す。

* @returns {PostErrorMessage}

*/

function createPostErrorMessage() {

return new PostErrorMessage(

window.document

.g Permalink | 記事への反応(0) | 15:40

2022-05-04

5chの書き込み特定文字列を含むものを探し出して、それに対して安価特定書き込みを返すってループがどうしても書けん

まず前半でつまづいてるわ

window.document.getElementsByClassName('thread')[0].querySelectorAll("div[span=escaped]")

って書き込んでlog表示させてみても配列の中身からっぽだ

ログイン ユーザー登録
ようこそ ゲスト さん