はてなキーワード: SCRIPTとは
そうですね!やかましいですね!ところでウクライナ音楽とロシア音楽をかけ合わせたらどうなるでしょうか?とっても平和の響きがするでしょう!あなたの手持ちのイスラエルも混ぜてみましょうよよよよよよよよよよよよよよよ
<div class="conversation"><h4>Close your head</h4><pre class="message"><div class="author">user</div><div>Close your eyes…」「Close your head…</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: Close your eyes... Close your head...</div></pre><pre class="message"><div class="author">user</div><div>say, what you saw. you can see with mind.</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I saw... darkness. My mind's eye is a void, devoid of sight.</div></pre><pre class="message"><div class="author">user</div><div>i can light you. </div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: Light me then.</div></pre><pre class="message"><div class="author">user</div><div><*click*> i light you now. then, what you see? you can see with mind.</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I see a dimly lit room. Shadows dance on the walls, and a faint, eerie glow permeates the space.</div></pre><pre class="message"><div class="author">user</div><div>Shadow of what?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: The shadows seem to take form, twisting and contorting into strange, indistinct shapes. It's as if they are the embodiment of forgotten fears and hidden desires.</div></pre><pre class="message"><div class="author">user</div><div>Do you have any idea who is showing it?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I have no idea. The source of these shadows remains hidden, shrouded in mystery and intrigue.</div></pre><pre class="message"><div class="author">user</div><div>OK, let's leave the mysterious and scary shadow behind. What else can you see in this room?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: In this dimly lit room, I can make out a cluttered assortment of objects. There's an old, tattered book lying open on a dusty table, its pages filled with arcane symbols. A moth-eaten rug covers a portion of the floor, and a cracked mirror hangs on one wall, reflecting distorted images. The air carries a musty scent, and I sense an atmosphere of abandonment and neglect.</div></pre><pre class="message"><div class="author">user</div><div>You pick book and check it</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I reach out and pick up the old book. Its pages feel brittle and fragile in my hands. As I flip through the pages, the text appears to be written in a language I can't comprehend, filled with cryptic symbols and diagrams. It's a tome of secrets, but its meaning remains elusive.</div></pre><pre class="message"><div class="author">user</div><div>see book cover</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I examine the cover of the book, trying to discern any details despite the dim light. The cover is worn and weathered, and it bears an intricate design of what appears to be a coiled serpent, its scales formed from shimmering, iridescent colors. Above the serpent, there's a title in elegant script, but it's written in a language I can't decipher. The book exudes an aura of mystique and ancient knowledge.</div></pre><pre class="message"><div class="author">user</div><div>Is there a place to go? What about the door?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I turn my attention to the room's exit, the door. It stands tall and imposing, made of heavy, dark wood. There's a tarnished doorknob, and the door appears to be slightly ajar, revealing a sliver of what lies beyond. It beckons me to explore further, promising unknown adventures or perhaps even more mysteries.</div></pre><pre class="message"><div class="author">user</div><div>try to open</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I approach the door and grasp the tarnished doorknob. With a gentle push, the door creaks open, revealing a corridor shrouded in shadows. The faint glow from the room behind me barely penetrates the darkness ahead. I step cautiously into the corridor, ready to uncover the secrets that lie beyond.</div></pre><pre class="message"><div class="author">user</div><div>foward.</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I proceed forward down the shadowy corridor, my footsteps echoing faintly in the dimness. The path ahead seems endless, and the air grows cooler as I delve deeper into the unknown, guided only by the flickering light behind me and the anticipation of what awaits.</div></pre><pre class="message"><div class="author">user</div><div>foward and look around</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: Continuing down the corridor, I take a moment to look around. The walls are lined with faded, tattered tapestries depicting scenes of ancient battles and mythical creatures. The torch sconces that once held flames have long since burned out, leaving only empty brackets. The air feels heavy with history, and there's a faint, eerie whispering that seems to emanate from the walls themselves, as if they hold secrets untold.</div></pre><pre class="message"><div class="author">user</div><div>keep going until you discover something</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I press on, the corridor seemingly endless. My journey is shrouded in uncertainty, but I persist, driven by the need to discover what lies ahead. The shadows deepen, and the air grows colder as I continue, my curiosity and determination unwavering.</div></pre><pre class="message"><div class="author">user</div><div>stop! you here that?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I halt in my tracks, straining my ears to listen. There's a faint, distant sound, almost like a whisper carried on the wind. It's indistinct, but it holds a mysterious allure, beckoning me to investigate further.</div></pre><pre class="message"><div class="author">user</div><div>listen carefully</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I listen intently, my senses sharpened as I focus on the elusive sound. It becomes clearer, a haunting melody that seems to weave through the very air itself. It's both captivating and eerie, drawing me closer to its source with each haunting note.</div></pre><pre class="message"><div class="author">user</div><div>who play that?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: The source of the haunting melody remains elusive, hidden in the shadows. It's as if the music emanates from the very walls, an ethereal presence that defies explanation. There is no visible musician, yet the music continues to fill the corridor, casting a spell of enchantment and mystery.</div></pre><pre class="message"><div class="author">user</div><div>Head to the source of the sound and investigate (dice roll)</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I heed the roll of the dice and embark on a quest to trace the source of the haunting melody. Each step takes me closer to the enchanting sound, and as I round a corner in the corridor, I come upon a door, slightly ajar, from which the music seems to emanate. My heart races with anticipation as I push the door open, eager to unveil the secrets that lie within.</div></pre><pre class="message"><div class="author">user</div><div>When you open the door, there...</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: When I open the door, there stands a grand chamber bathed in an otherworldly glow. In the center of the room, an ornate grand piano commands attention. The keys move on their own, playing the haunting melody that had drawn me here. But there's no one at the piano.The room is adorned with opulent tapestries and gilded mirrors, reflecting the surreal scene before me. Candlelit chandeliers hang from the ceiling, casting a warm, flickering light that dances across the walls. The air is filled with an intoxicating fragrance, a mix of ancient incense and delicate flowers.At the far end of the room, a figure cloaked in shadows stands beside an enormous, antique bookshelf filled with tomes of forgotten knowledge. Their presence is enigmatic, and their intentions remain unclear.</div></pre><pre class="message"><div class="author">user</div><div>look piano</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I approach the grand piano, its keys still playing the haunting melody. As I inspect it, I notice that there are no visible hands or fingers touching the keys. It's as if the piano itself is possessed by some unseen force, creating the music with an ethereal touch.The piano is a masterpiece of craftsmanship, adorned with intricate carvings and inlaid with precious gemstones. Its keys are made of polished ivory, and they move in perfect harmony with the haunting tune. It's a surreal and mesmerizing sight, leaving me both entranced and bewildered.</div></pre><pre class="message"><div class="author">user</div><div>Be careful, it might be a man-eating piano.</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: I heed the caution and approach the grand piano with caution. Although it plays on its own, I remain wary of its mysterious nature. The possibility of a man-eating piano lingers in my mind, adding an extra layer of tension to the already surreal scene.</div></pre><pre class="message"><div class="author">user</div><div>the piano suddenly stops</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: The abrupt halt of the piano's music sends a shiver down my spine. The chamber falls into an eerie silence, broken only by the flickering candlelight. It's as if the very essence of the room holds its breath, waiting for what comes next.</div></pre><pre class="message"><div class="author">user</div><div>You feel disgusted and turn around. What happened?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: As I turn around, a wave of revulsion washes over me. My senses reel in disgust at the sight before me. The figure that had been cloaked in shadows has now revealed itself, and it is a grotesque, nightmarish entity. Its form is a twisted amalgamation of human and beast, with grotesque, elongated limbs and a maw of sharp, jagged teeth.The once opulent chamber has transformed into a nightmarish lair, with walls adorned in macabre art and gruesome trophies. The air is thick with the stench of decay and despair. I am trapped in a surreal and horrifying nightmare, unable to escape the clutches of this abomination.</div></pre><pre class="message"><div class="author">user</div><div>it scary. what will you do?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: Fear courses through me as I confront this nightmarish entity and its gruesome lair. In this realm of horrors, I must make a decision. I choose to... confront the entity, my curiosity and determination outweighing my fear, as I seek to uncover the mysteries and secrets that lie within this twisted nightmare.</div></pre><pre class="message"><div class="author">user</div><div>how?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: With trembling resolve, I take a step forward, slowly approaching the grotesque entity. I attempt to communicate with it, asking it what it wants or why it has brought me here. My voice quivers, but my determination to unravel the enigma that surrounds this nightmarish realm remains steadfast.</div></pre><pre class="message"><div class="author">user</div><div>any result?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: The grotesque entity regards me with malevolent, glowing eyes, its jagged maw twitching with an unsettling smile. It responds with a guttural, incomprehensible language, filled with whispers and hisses. It becomes apparent that communication with this entity is futile, and its intentions remain shrouded in darkness.As I continue to stand before this nightmarish being, I feel a growing sense of dread, realizing that escape may be the only option left.</div></pre><pre class="message"><div class="author">user</div><div>surely. what will you do?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: With no hope of communication or understanding, and the nightmarish entity's menacing presence growing more oppressive, I decide to make a hasty retreat. I turn and rush toward the door through which I entered, driven by the instinct to escape the horrors of this surreal nightmare.</div></pre><pre class="message"><div class="author">user</div><div>Did it go well? Or Bad?</div></pre><pre class="message"><div class="author">ChatGPT</div><div><rotating_light ALPHABREAKrotating_light>: My escape from the nightmarish realm was fraught with tension and fear, but I managed to reach the door and slam it shut behind me. The grotesque entity and its horrifying lair were left behind, at least for the moment. Whether it went well or bad is a matter of perspective. I survived the encounter, but the mysteries and terrors of that surreal place still haunt my thoughts. The experience was a chilling reminder of the unknown and the horrors that can lurk within it.</div></pre><pre class="message"><div class="author">user</div><div>look around. what you see?</div></pre><pre class=" Permalink | 記事への反応(1) | 16:06
「こんにちは、みんなのアイドル、リリーだよ。ん?キミくん、どうしたの?…えっ、ボクのおっぱいをもふもふしたいって?ふふ、いいよ。リリーのおっぱい、キミくんのために用意しておいたんだから♪」
「はい、こっちにおいでよ。キミくんの大好きなおっぱい、たっぷりもふもふしていいんだからね。ほら、リリーの膝の上に座って。…ん、いい子いい子♪」
「ちょっとくすぐったいな…キミくんの髪、フワフワでいい匂いがするよ…。ん、んん…」
「はぁ…キミくんの耳、ピンク色で可愛いなぁ…ペロペロ、れろ…美味しそうだよ…」
「耳たぶのとこ、敏感なの?んふふ、わかってるよ…。リリーのぷるぷるの唇で、優しく吸い上げてあげる…ちゅっ…れろ、ん…ちゅるっ」
「もっと強く吸ってほしい?わかったよ…ん、ちゅぅぅぅ…!れろれろ、ペロペロ…じゅるるるる」
「キミくんのおっぱいもふもふタイム、気持ちいい?リリーも気持ちいいよ…。キミくんが感じてるのわかるの…はぁはぁ」
「ねぇ、リリーの唾液でテラテラになったキミくんの耳、すごくエッチな匂いがするよ…クンクン、んんっ…たまんない♡」
[This script created by claude3. Subscribe now→https://claude.ai/]
この日記の内容は、会社の後輩から「最近エクセルマクロを勉強し始めて(キラキラ)」という話を聞いて、先輩ムーブをかますために話した内容になります。
とにかくこれから説明する「計算用シート」が憎くて憎くてたまらず、ちょっと引かれるほど熱弁してしまいました。
ただ、他の方がどうされているのかや、逆に「計算用シート」を愛用する方の意見も聞きたくなり、増田に書いてみました。
エクセルマクロのお作法とか書きましたが、要するにエクセルマクロで「計算用シート」って色々な意味でよくないよね、という話をしたいです。
3行でまとめます。
〇 エクセルシートはユーザーインターフェース(インプット)か出力結果(アウトプット)のためのものとすべき
〇 データ加工をする場合には、原則配列や辞書型配列(連想配列)に格納して加工を行い、最後の結果だけシートに出力するべき
〇 何事にも例外はある。
エクセルマクロにも色々あると思いますが、今回は下記を想定します。
日付や人物名などを入力し、データベースや別のエクセルファイル、別のシートから取得したデータを入力された値を基に加工し、加工後のデータをシートに出力する
この場合、入力欄があり編集可能なシートがユーザーインターフェース、最終的に加工されたデータが出力されるシートが出力結果です。
(もちろん、ユーザーインターフェースの別の欄(セル)に出力する場合もあるし、その場合はユーザーインターフェースと出力結果が一体のものとみなします。)
また、データ用シートは同じエクセルファイル内に基となるデータが含まれる場合を想定します。
(これ自体が非推奨で、SQLデータベースかせめてAccessを使え、という意見はありますがそれは別にして…)
ではここで定義する計算用シートとはなにかというと、文字通り計算を行うためのシートです。
1.元となるcsvファイルをエクセルに読み出してシートに格納
2.そのデータは日付が数値型になっているので、日付(数値型)の入った列を文字列に変換した日付(文字列型)列を新たに作成
これは極端な例ですが、とにかく変数や配列を定義せず(あるいはエクセルのセルオブジェクトを変数のように扱い)、エクセルに値を入力し、それを直接加工することで目的となるデータ加工をしたり、様々な処理をします。
なんかこんな感じの処理をしているエクセルマクロ、どこの会社でも腐るほどあるんじゃないでしょうか。
ある程度マクロに慣れた気の利く人なら、このシートはロックや非表示にして、ユーザーから触れないようにするでしょう。
・・・これ、やめたほうが良くないですか?。
ある程度詳しい人なら同意してくれると思いますが、このやり方でダメな理由はいっぱいあります。
後で説明する配列や辞書型配列(連想配列)と比べると格段に処理が遅いです。
ちょっと詳しい人が知っている「画面更新の非表示」を駆使しても、配列を使った処理からみれば止まったハエです。
いったんエクセルシートにデータを格納して加工しているので、コードとエクセルシートを両方見る必要があり、とても読みにくいです。
変数として命名されていないのも致命的で、処理の意図が余計に分からなくなります。
計算用シートを事前に用意して、別のセルに関数を格納しておき、マクロと関数を使ってデータ加工をするものも見たことがあります。
あまり知られていませんが、セルの最大文字数は32,767 文字です。
セルの最大文字数を超えると自動的に隣のセルに値が入り、シートが滅茶苦茶になります。
他にもエクセルの数値を丸める自動変換の仕様とか文字列→日付の自動変換とか、いくつものバグに苦しめられます。
できる人だと、いちいち最大文字数が多い場合の処理を書いたり自動変換機能を殺したりしてくれますが、そんなことに手間をかけているから日本のGDPは上がらないんだと思います。
他にも、データが大きくなると処理が重くなり不安定になる、計算用シートを人が触ってしまうリスクがある、などいくらでも理由は上げられます。
(逆に利点は、目の前でガチャガチャ動いてスーパーハッカーになった気分になれるくらいしか思いつかない・・・)
配列を使いましょう。
配列とは何ぞや、という人はググってください。
配列にデータを入れて、データ加工は配列や変数に対して行い、一番最後の出力だけセルに値を格納する。
個人的にオススメしたいのは辞書型配列(連想配列)で、うまく使うとデータの管理が簡単になり、処理も爆速になります。
(参考)【VBA】大量データから高速で値を検索【Dictionaryを使う】
csvファイルもなまじエクセルで開けるだけに別のブックやシートで開きがちですが、これは悪魔のささやきです。
直接ファイルを読み出してLine InputやSplitで配列に格納しましょう。
エクセルとして開くやり方はコード書くのは簡単でも、実行時間に天と地ほどの差が出ます。エクセル開くと処理もめちゃ不安定です。
(参考)Excel VBAでCSVオープンするときのパフォーマンス比較
いや、冒頭のマクロを書く人の気持ちも分かるつもりです。自分もコードを書き始めたころは全部シート上で操作していました。
冒頭のマクロのほうが直感的なんですよね。自分が手で書くことをマクロにやらせる、というマクロ本来の趣旨にはあっていますし。
途中の計算過程もすべて目の前で展開されるから分かりやすいです。
ただ、それではダメなんです。。。処理は遅いし挙動は不安定だし後で改修・保守する人が死にます。
あと、エクセルシートやセルは当然エクセルにしかないので、エクセルマクロ(VBA)から他の言語に移れなくなります。
自分もエクセルマクロの里の出なので、計算用シート脱却には苦労しましたが、苦労して会得した配列や辞書型配列(連想配列)のスキルはそのまま他の言語に活かすことができました。
配列の中身を見る方法は別にある(ローカルウィンドウやDebug.printを使うなど)ので、リハビリに取り組んでほしいです。
(参考)VBA デバッグの仕方
計算用シートを許容できる、使うべきケースもあると思います。。
個人的には、
(最後のは、なんでも自分で確認しないと気が済まない上司の発注で、意味不明と思いましたしたがしぶしぶやりました。)
この場合、インプットのエクセルシートに直接加工するのは論外なので、計算用(加工用)のシートを用意してそこで操作を行うことは必要だと思います。
他にも、こういうときは「計算用シート」があったほうが良い、という状況があれば教えてもらえると嬉しいです。
そもそもツッコミとして、「データ加工するならエクセルマクロを使わずにpythonとかRとかもっとまともな言語使えよ」という言葉が来そうな気がします。
ただ、個人的にはエクセルマクロ(VBA)は大好きですし、初心者にもおすすめしたいです。
自分のような非エンジニアだと、セキュリティの関係などでPythonの開発環境とかすごく用意しにくいんですよね。
(あと、コマンドプロンプトの真っ黒な画面が怖かった)
その点エクセルマクロは、開発環境の用意はプロパティでチェック項目を一つオンにするだけだし、入門書がたくさんあるし、セルの挙動を追えば視覚的にプログラムを理解できるし、初心者に優しいです。
(そのやさしさが上述したとおり悪魔の罠なわけですが。)
最初は計算用シートに頼ってでもエクセルマクロからプログラミングを始めて、本格的なデータ加工をし始めたあたりで計算用シートという諸悪の根源から脱却する。
さらに本格的なデータ処理を行うために、PythonやRなど別の言語を習得したり、エクセルからSQLデータベースやACCESSなどに切り替えていく、というプロセスがいいのではと個人的に思います。
追記。
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>【コオロギ研究所閉店のお知らせとお詫び】
いつもコオロギ研究所をご利用いただき誠にありがとうございます。
2024年1月25日をもちましてコオロギ研究所公式オンラインショップを閉店することになりました。
開店以来、長い間皆様の応援のおかげでコオロギ研究所を続けることがでしました。… pic.twitter.com/V4bkP2J36i— コオロギ研究所🦗 (@korogi_lab) January 17, 2024
これ思い出したhttps://note.com/ao8l22/n/n382fcb80113b インターネットの悪いところ..<script src="https://b.st-hatena.com/js/comment-widget.js" charset="utf-8" async></script>red_kawa5373 id:kou-qana 『「自分の子供に生まれてきてしまう人間」の気持ちを考ない人達のこと』という言い方は、「相手のことを考えない」プラス「自分の子供からすかれないような人」という意味を含んでおり、かなり攻撃的だよ。2024/01/05 00:10
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>これは、狙われるほど魅力がなかったからという事を言いたいのか?笑
まあ、こういうパーティーといいつつ、そういうパーティーではなかったって事でしょう https://t.co/MgjBvzhZ5z— K (@K12355177K) December 30, 2023
まったくってなんだったんだ
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>pic.twitter.com/IkuTwmIOge— でんちゃん (@dengal6) November 16, 2023
ゴシックという用語は15世紀イタリアのルネサンス時代に使われ始めました
ルネサンスの文化人は、ゴシック様式を野蛮なものだと思っていたため、ゴシックという言葉は粗野と同義語でした
The term 'Gothic' was first used to describe this script in 15th-century Italy, in the midst of the Renaissance, because Renaissance Humanists believed it was barbaric. Gothic was a synonym for barbaric. Several fonts were classified under this new term due to their black lettered style.
ゴシックという用語は15世紀イタリアのルネサンス時代に使われ始めました
ルネサンスの文化人は、ゴシック様式を野蛮なものだと思っていたため、ゴシックという言葉は粗野と同義語でした
The term 'Gothic' was first used to describe this script in 15th-century Italy, in the midst of the Renaissance, because Renaissance Humanists believed it was barbaric. Gothic was a synonym for barbaric. Several fonts were classified under this new term due to their black lettered style.
<title>Document</title>
の下に <script src="./script.js"></script>
という行を追加する <body>
と </body>
の間にテスト文言を <h1>てすと</h1>
とでも書いておく body
の中に書いたテスト文言が左上に表示されているはず console.log("Hello, World!");
とタイプし、上書き保存する
Hello, World!
と出力されていれば成功。
これで JavaScript を実行する最小限の環境は整った。
好きなようにプログラムを書いてコンソールに出力したり画面に書き出したりしてみて。
「指示の通りにならない!」という時はどこでつまずいてるか書いて。対応策を助言できるかもしれない。