- プロンプト実行例

スクリプトを複数ファイルにまとめます。

var charCount = inputText.length;
var charCountNoSpace = inputText.replace(/\s/g, '').length;
var wordCount = inputText.trim().split(/\s+/).length;
var lineBreakCount = (inputText.match(/\n/g) || []).length;
var alphabetCount = inputText.replace(/[^A-Za-z]/g, '').length;
var numberCount = inputText.replace(/[^0-9]/g, '').length;
var hiraganaCount = inputText.replace(/[^ぁ-んァ-ン]/g, '').length;
var katakanaCount = inputText.replace(/[^ァ-ン]/g, '').length;
var punctuationCount = inputText.replace(/[^。、.,-]/g, '').length;
var symbolCount = inputText.replace(/[^!-]/g, '').length;
var kanjiCount = inputText.replace(/[^一-龠々]/g, '').length;
var urlCount = inputText.split('http').length - 1;
var utf8ByteCount = new Blob([inputText], {type: 'plain/text'}).size;
var shiftJISByteCount = unescape(encodeURIComponent(inputText)).length;
var jisByteCount = inputText.replace(/[^ -。-゚]/g, '').length;
var eucJPByteCount = encodeURIComponent(inputText).replace(/%[A-F\d]{2}/g, 'U').length;
var charPerPage = parseFloat(document.getElementById("charPerPage").value); var includeHalfWidth = document.getElementById("includeHalfWidth").checked;
var pageCount = Math.ceil(charCount / charPerPage); if (includeHalfWidth) { charCount += inputText.replace(/[^\x01-\x7E]/g, '').length * -0.5; }
document.getElementById("charCount").textContent = charCount; document.getElementById("charCountNoSpace").textContent = charCountNoSpace; document.getElementById("wordCount").textContent = wordCount; document.getElementById("lineBreakCount").textContent = lineBreakCount; document.getElementById("alphabetCount").textContent = alphabetCount; document.getElementById("numberCount").textContent = numberCount; document.getElementById("hiraganaCount").textContent = hiraganaCount; document.getElementById("katakanaCount").textContent = katakanaCount; document.getElementById("punctuationCount").textContent = punctuationCount; document.getElementById("symbolCount").textContent = symbolCount; document.getElementById("kanjiCount").textContent = kanjiCount; document.getElementById("urlCount").textContent = urlCount; document.getElementById("utf8ByteCount").textContent = utf8ByteCount; document.getElementById("shiftJISByteCount").textContent = shiftJISByteCount; document.getElementById("jisByteCount").textContent = jisByteCount; document.getElementById("eucJPByteCount").textContent = eucJPByteCount; document.getElementById("pageCount").textContent = pageCount; } </script>
</head> <body> <textarea id="input" rows="10" cols="50" placeholder="ここにテキストを入力してください"></textarea> <br> <button onclick="countCharacters()">文字数をカウント</button> <br> <label for="charPerPage">1ページあたりの文字数: </label> <input type="number" id="charPerPage" value="400"> <label><input type="checkbox" id="includeHalfWidth">半角文字を0.5文字としてカウントする</label> <br> <p>文字数(スペース込み): <span id="charCount"></span></p> <p>文字数(スペース無視): <span id="charCountNoSpace"></span></p> <p>単語数: <span id="wordCount"></span></p> <p>改行コード数: <span id="lineBreakCount"></span></p> <p>英字数: <span id="alphabetCount"></span></p> <p>数字数: <span id="numberCount"></span></p> <p>ひらがな数: <span id="hiraganaCount"></span></p> <p>カタカナ数: <span id="katakanaCount"></span></p> <p>句読点数: <span id="punctuationCount"></span></p> <p>記号数: <span id="symbolCount"></span></p> <p>漢字数: <span id="kanjiCount"></span></p> <p>URL数: <span id="urlCount"></span></p> <p>UTF-8バイト数: <span id="utf8ByteCount"></span></p> <p>Shift_JISバイト数: <span id="shiftJISByteCount"></span></p> <p>JISバイト数: <span id="jisByteCount"></span></p> <p>EUC_JPバイト数: <span id="eucJPByteCount"></span></p> <p>原稿用紙何枚: <span id="pageCount"></span></p> </body> </html>
html1<!-- index.html --> 2<!DOCTYPE html> 3<html lang="ja"> 4<head> 5 <meta charset="UTF-8"> 6 <title>文字数カウントツール</title> 7 <link rel="stylesheet" type="text/css" href="styles.css"> 8</head> 9<body> 10 <textarea id="input" rows="10" cols="50" placeholder="ここにテキストを入力してください"></textarea> 11 <br> 12 <button onclick="countCharacters()">文字数をカウント</button> 13 <br> 14 <label for="charPerPage">1ページあたりの文字数: </label> 15 <input type="number" id="charPerPage" value="400"> 16 <label><input type="checkbox" id="includeHalfWidth">半角文字を0.5文字としてカウントする</label> 17 <br> 18 <p>文字数(スペース込み): <span id="charCount"></span></p> 19 <p>文字数(スペース無視): <span id="charCountNoSpace"></span></p> 20 <p>単語数: <span id="wordCount"></span></p> 21 <p>改行コード数: <span id="lineBreakCount"></span></p> 22 <p>英字数: <span id="alphabetCount"></span></p> 23 <p>数字数: <span id="numberCount"></span></p> 24 <p>ひらがな数: <span id="hiraganaCount"></span></p> 25 <p>カタカナ数: <span id="katakanaCount"></span></p> 26 <p>句読点数: <span id="punctuationCount"></span></p> 27 <p>記号数: <span id="symbolCount"></span></p> 28 <p>漢字数: <span id="kanjiCount"></span></p> 29 <p>URL数: <span id="urlCount"></span></p> 30 <p>UTF-8バイト数: <span id="utf8ByteCount"></span></p> 31 <p>Shift_JISバイト数: <span id="shiftJISByteCount"></span></p> 32 <p>JISバイト数: <span id="jisByteCount"></span></p> 33 <p>EUC_JPバイト数: <span id="eucJPByteCount"></span></p> 34 <p>原稿用紙何枚: <span id="pageCount"></span></p> 35 <script src="scripts.js"></script> 36</body> 37</html>
css1/* styles.css */ 2/* Add your styles here */
JavaScript1// scripts.js 2function countCharacters() { 3 var inputText = document.getElementById("input").value; 4 5 var charCount = inputText.length; 6 var charCountNoSpace = inputText.replace(/\s/g, '').length; 7 var wordCount = inputText.trim().split(/\s+/).length; 8 var lineBreakCount = (inputText.match(/\n/g) || []).length; 9 var alphabetCount = inputText.replace(/[^A-Za-z]/g, '').length; 10 var numberCount = inputText.replace(/[^0-9]/g, '').length; 11 var hiraganaCount = inputText.replace(/[^ぁ-んァ-ン]/g, '').length; 12 var katakanaCount = inputText.replace(/[^ァ-ン]/g, '').length; 13 var punctuationCount = inputText.replace(/[^。、.,\-]/g, '').length; 14 var symbolCount = inputText.replace(/[^!-~]/g, '').length; 15 var kanjiCount = inputText.replace(/[^一-龠々]/g, '').length; 16 var urlCount = inputText.split('http').length - 1; 17 var utf8ByteCount = new Blob([inputText], {type: 'plain/text'}).size; 18 var shiftJISByteCount = unescape(encodeURIComponent(inputText)).length; 19 var jisByteCount = inputText.replace(/[^ -~。-゚]/g, '').length; 20 var eucJPByteCount = encodeURIComponent(inputText).replace(/%[A-F\d]{2}/g, 'U').length; 21 22 var charPerPage = parseFloat(document.getElementById("charPerPage").value); 23 var includeHalfWidth = document.getElementById("includeHalfWidth").checked; 24 25 var pageCount = Math.ceil(charCount / charPerPage); 26 if (includeHalfWidth) { 27 charCount += inputText.replace(/[^\x01-\x7E]/g, '').length * -0.5; 28 } 29 30 document.getElementById("charCount").textContent = charCount; 31 document.getElementById("charCountNoSpace").textContent = charCountNoSpace; 32 document.getElementById("wordCount").textContent = wordCount; 33 document.getElementById("lineBreakCount").textContent = lineBreakCount; 34 document.getElementById("alphabetCount").textContent = alphabetCount; 35 document.getElementById("numberCount").textContent = numberCount; 36 document.getElementById("hiraganaCount").textContent = hiraganaCount; 37 document.getElementById("katakanaCount").textContent = katakanaCount; 38 document.getElementById("punctuationCount").textContent = punctuationCount; 39 document.getElementById("symbolCount").textContent = symbolCount; 40 document.getElementById("kanjiCount").textContent = kanjiCount; 41 document.getElementById("urlCount").textContent = urlCount; 42 document.getElementById("utf8ByteCount").textContent = utf8ByteCount; 43 document.getElementById("shiftJISByteCount").textContent = shiftJISByteCount; 44 document.getElementById("jisByteCount").textContent = jisByteCount; 45 document.getElementById("eucJPByteCount").textContent = eucJPByteCount; 46 document.getElementById("pageCount").textContent = pageCount; 47}
コメント 0
他のプロンプトもチェック
画像生成
キャラクター作成
▼最新作はこちら▼ https://oshiete.ai/item_lists/73557973863457792 5つの質問を答えるだけであなたの顔をAIが予測。水墨画でおしゃれなポートレート画像を出力します。SNSのアイコンや自己紹介プレゼンの際の画像に利用してください。 #DALLE #人物画 #ポートレート12239208GPTs
ロールプレイ
連動企画
詳細な人物設定を半自動的に作成し、その人物になりきって会話ができるカスタムGPTです。架空のインタビューやアンケート調査、人生相談など、客観的な意見を知りたい時に最適です。外国語レッスンや営業・接客のロールプレイング研修などにもお使い頂けます。 「スタート」を押すとガイダンスが生成されますので、完全にランダムでいい場合は「全部お任せで」、希望がある場合には大まかな設定をお送りください。「演技モード開始」と伝えるとロールプレイングを始めます。 プロンプト例:私はプロンプトエンジニアです。AI研究者に私が書いたプロンプトについて評価してもらいたい。すべてお任せするので、高名なAI研究者の人格を作成してください。連絡手段はメールという設定でお願いします。 ・詳細な人格設定と再現力 ChatGPTもキャラクター設定やロールプレイングに対応できますが、Synthetic Personaはより詳細な人物設定を作成し、想定される性格や話し方、価値観に至るまで、思考をリアルにシミュレートした会話を行えます。 ・人間に対する高い解像度 システムプロンプトに人間的思考や感情を再現する方法、高度な演技を行うためのメソッドを多数設定しています。そのため、標準のChatGPTよりも高い解像度での「人間の模倣」が可能になっています。 簡単に言えば、人物設定の作成と演技力を集中的に強化したカスタムGPTです。検証した範囲では、標準のChatGPTとは比べ物にならないほどリアルなロールプレイングと思考の再現が可能でした。非常に汎用性が高いので、ぜひともご活用ください。50184446画像生成
キャラクター作成
推奨モデル - DALL•E 3テーマを 入力して、オリジナルのゆるキャラを作ってみてください。 公開プロンプトは 自由に使用してください🤙 #SNS #Instagram #X #Twitter #TikTok #ChatGPT #画像生成 #マーケティング1025517画像生成
キャラクター作成
推奨モデル - DALL•E 3心にそよ風が吹き込むほど爽やかな人物の写真。背景がほぼ無地のため、とてもきれいに切り抜き(背景削除)ができます(切り抜き方法は下記参照)。 背景を削除することでどんなデザインにも溶け込み、ポスターやチラシ、SNS投稿などに使えば、瞬時に華やぎをプラスします。Canvaなどの無料ツール(下記参照)に使うことでいろんな写真や素材・文字などに合わせて素敵な画像が作れます。 また、実行の際には服装を自由に入力できるので、作りたい作品に合わせた服装の写真にすることができます。 プロ仕様の高解像度で、思わず手に取りたくなるクオリティです。デザイン初心者も、クリエイティブなプロも、この1枚で可能性が広がる。世界にひとつだけの作品を作る、あなたの魔法の素材となるでしょう。 <切り抜き方法の例> 1.ツールを使用する方法 生成した写真をダウンロードし、それを「remove.bg」や「clipdrop」などの背景削除ツールにアップして使うことで簡単に切り抜きできます。 https://www.remove.bg/ja https://clipdrop.co/remove-background 2.iPhoneを使用する方法 iPhoneの写真アプリに保存していれば、写真を開いて人物部分を長押し →切り抜く部分が選択されたのを確認し、「共有」→「写真に保存」をタップ <無料デザインツールの例> Canva https://www.canva.com/ja_jp/ Adobe Express https://new.express.adobe.com デザインAC https://www.design-ac.net/ (使い方などはYouTube動画等で検索してください)101571