import tkinter as tk
from tkinter import ttk, messagebox
import webbrowser
import os
class WebBrowser(tk.Tk):
def __init__(self):
super().__init__()
self.title("Web Browser")
self.geometry("800x600")
self.notebook = ttk.Notebook(self)
self.notebook.pack(fill="both", expand=True)
self.tabs = []
self.add_new_tab()
def add_new_tab(self):
tab = ttk.Frame(self.notebook)
self.notebook.add(tab, text="New Tab")
url_entry = ttk.Entry(tab, width=70)
url_entry.grid(row=0, column=1, padx=5, pady=5, sticky="ew")
url_entry.bind("<Return>", lambda event: self.open_webpage(url_entry.get()))
go_button = ttk.Button(tab, text="Go", command=lambda: self.open_webpage(url_entry.get()))
go_button.grid(row=0, column=2, padx=5, pady=5)
back_button = ttk.Button(tab, text="Back", command=lambda: self.back(tab))
back_button.grid(row=0, column=0, padx=5, pady=5)
forward_button = ttk.Button(tab, text="Forward", command=lambda: self.forward(tab))
forward_button.grid(row=0, column=3, padx=5, pady=5)
close_button = ttk.Button(tab, text="X", command=lambda: self.close_tab(tab))
close_button.grid(row=0, column=4, padx=5, pady=5)
progress_bar = ttk.Progressbar(tab, orient="horizontal", mode="indeterminate")
progress_bar.grid(row=1, column=1, columnspan=2, sticky="ew")
web_browser = ttk.Frame(tab)
web_browser.grid(row=2, column=0, columnspan=5, padx=5, pady=5, sticky="nsew")
self.tabs.append({
"tab": tab,
"url_entry": url_entry,
"go_button": go_button,
"back_button": back_button,
"forward_button": forward_button,
"close_button": close_button,
"progress_bar": progress_bar,
"web_browser": web_browser,
"browser": webbrowser.get(),
"current_page": None
})
def open_webpage(self, url):
if not url.startswith("http://") and not url.startswith("https://"):
url = "http://" + url
tab = self.notebook.select()
tab_index = self.notebook.index(tab)
tab_info = self.tabs[tab_index]
tab_info["browser"].open_new(url)
tab_info["current_page"] = url
def back(self, tab):
tab_index = self.notebook.index(tab)
tab_info = self.tabs[tab_index]
tab_info["browser"].back()
def forward(self, tab):
tab_index = self.notebook.index(tab)
tab_info = self.tabs[tab_index]
tab_info["browser"].forward()
def close_tab(self, tab):
tab_index = self.notebook.index(tab)
self.notebook.forget(tab_index)
del self.tabs[tab_index]
if __name__ == "__main__":
app = WebBrowser()
app.mainloop()
書籍 ネトゲ戦記の商品お取り扱いにつきまして – アニメイト
2024.02.09 お知らせ <令和6年能登半島地震 義援金のご報告とお礼> 2024年1月に発生した能登地方を震源とする地震で被災された方々に対しまして、心よりお見舞い申し上げます。 アニメイト各店では、2024年1月10日(水)より、能登半島地震災害の被災者支援のための募金活動を開始いたしました。 皆様… 2024.01.19 …
Posted from: this blog via Microsoft Power Automate.
つぶやきアプリ「ELDER」
index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ELDER</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>ELDER</h1>
</header>
<main>
<section id="post-form">
<h2>つぶやく</h2>
<form id="tweet-form">
<input type="text" id="user-name" placeholder="ユーザー名">
<textarea id="tweet-content" placeholder="今何をつぶやく?" maxlength="280"></textarea>
<div id="counter">0 / 280</div>
<button type="submit">つぶやく</button>
</form>
</section>
<section id="tweets">
<h2>つぶやき</h2>
<!-- つぶやきの表示領域 -->
</section>
</main>
<footer>
<p>© 2024 ELDER</p>
</footer>
<script src="script.js"></script>
</body>
</html>
styles.css
/* Reset CSS */
body, h1, h2, form, textarea, button, input {
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f0f0f0;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px 0;
}
main {
margin-top: 20px;
}
#post-form, #tweets {
background-color: #fff;
padding: 20px;
margin-bottom: 20px;
border-radius: 5px;
}
input[type="text"], textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
resize: vertical;
}
#counter {
margin-bottom: 10px;
color: #666;
}
button {
padding: 10px 20px;
background-color: #333;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #555;
}
.tweet {
border-bottom: 1px solid #ccc;
padding: 10px 0;
}
.tweet-content {
margin-bottom: 5px;
}
.tweet-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.like-button, .comment-button {
background-color: transparent;
border: none;
color: #666;
cursor: pointer;
}
.like-button:hover, .comment-button:hover {
color: #333;
}
.comments {
margin-top: 10px;
padding: 10px;
background-color: #f9f9f9;
border-radius: 3px;
}
.comment-input {
width: calc(100% - 80px);
margin-bottom: 10px;
}
.comment-list {
list-style: none;
padding: 0;
}
.comment-item {
border-bottom: 1px solid #ccc;
padding: 5px 0;
}
.comment-author {
font-weight: bold;
margin-bottom: 5px;
}
.comment-content {
margin-left: 20px;
}
script.js
document.addEventListener("DOMContentLoaded", function() {
const tweetForm = document.getElementById("tweet-form");
const userNameInput = document.getElementById("user-name");
const tweetContent = document.getElementById("tweet-content");
const tweetsSection = document.getElementById("tweets");
const counter = document.getElementById("counter");
// ローカルストレージからデータを取得
let tweets = JSON.parse(localStorage.getItem("tweets")) || [];
// ページ読み込み時に保存されたつぶやきを表示
tweets.forEach(function(tweet) {
displayTweet(tweet);
});
// つぶやきを投稿するイベントリスナー
tweetForm.addEventListener("submit", function(event) {
event.preventDefault(); // フォームのデフォルトの動作をキャンセル
const content = tweetContent.value.trim();
const userName = userNameInput.value.trim();
if (userName === "") {
alert("ユーザー名を入力してください!");
return;
}
if (content === "") {
alert("つぶやきを入力してください!");
return;
}
if (content.length > 280) {
alert("つぶやきは280文字以内で入力してください!");
return;
}
// つぶやきを表示する
displayTweet({userName: userName, content: content, likes: 0});
// ローカルストレージにデータを保存
tweets.push({userName: userName, content: content, likes: 0});
localStorage.setItem("tweets", JSON.stringify(tweets));
// フォームをクリアする
tweetContent.value = "";
userNameInput.value = "";
counter.textContent = "0 / 280";
});
// 文字数カウンターの更新
tweetContent.addEventListener("input", function() {
const contentLength = tweetContent.value.length;
counter.textContent = contentLength + " / 280";
});
// つぶやきを表示する関数
function displayTweet(tweet) {
const tweetDiv = document.createElement("div");
tweetDiv.classList.add("tweet");
const tweetContentDiv = document.createElement("div");
tweetContentDiv.classList.add("tweet-content");
tweetContentDiv.textContent = tweet.content;
const tweetActionsDiv = document.createElement("div");
tweetActionsDiv.classList.add("tweet-actions");
const likeButton = document.createElement("button");
likeButton.classList.add("like-button");
likeButton.textContent = "いいね";
likeButton.addEventListener("click", function() {
tweet.likes++;
localStorage.setItem("tweets", JSON.stringify(tweets));
updateTweet(tweet, tweetDiv);
});
const commentButton = document.createElement("button");
commentButton.classList.add("comment-button");
commentButton.textContent = "コメント";
tweetActionsDiv.appendChild(likeButton);
tweetActionsDiv.appendChild(commentButton);
tweetDiv.appendChild(tweetContentDiv);
tweetDiv.appendChild(tweetActionsDiv);
updateTweet(tweet, tweetDiv);
tweetsSection.prepend(tweetDiv); // 新しいつぶやきを上に表示
}
// つぶやきの表示を更新する関数
function updateTweet(tweet, tweetDiv) {
tweetDiv.innerHTML = ""; // 既存の表示をクリア
const tweetContentDiv = document.createElement("div");
tweetContentDiv.classList.add("tweet-content");
tweetContentDiv.textContent = `${tweet.userName}: ${tweet.content}`;
const tweetActionsDiv = document.createElement("div");
tweetActionsDiv.classList.add("tweet-actions");
const likeButton = document.createElement("button");
likeButton.classList.add("like-button");
likeButton.textContent = `いいね (${tweet.likes})`;
likeButton.addEventListener("click", function() {
tweet.likes++;
localStorage.setItem("tweets", JSON.stringify(tweets));
updateTweet(tweet, tweetDiv);
});
const commentButton = document.createElement("button");
commentButton.classList.add("comment-button");
commentButton.textContent = "コメント";
tweetActionsDiv.appendChild(likeButton);
tweetActionsDiv.appendChild(commentButton);
tweetDiv.appendChild(tweetContentDiv);
tweetDiv.appendChild(tweetActionsDiv);
}
});
http://tyosuke20xx.com/ELDER/index.html
「ここでしか手に入らない」と書かれていたのに…… 角川「くじ引き堂」への不満訴える投稿に注目集まる 運営元と弁護士の見解は
「ここでしか手に入らないオリジナルグッズ」と書かれていたのに――オンラインくじでゲームのグッズを購入後、同じグッズが海外で個別販売されたとして不満を訴える投稿に共感が集まっています。購入者やくじの運営元、弁護士に取材しました。 購入者が注意喚起を投稿したくじ引き堂の「コーヒートーク オンラインくじ」…
Posted from: this blog via Microsoft Power Automate.
天使の輪が死人を表す漫画的表現になっているのって変だな 人が死んでも天..
天使の輪が死人を表す漫画的表現になっているのって変だな 人が死んでも天使になるわけじゃない、キリスト教的世界観においても この表現を多用している一番有名な漫画はおそらくドラゴンボールだろう どこかで発想の飛躍があったのかな 気になるねえ、ぐぐりましょうねえ 天使に限らず聖人などを描いた絵画にも、聖人の…
Posted from: this blog via Microsoft Power Automate.
日本の画期的カキ陸上養殖に仏紙「久米島で革命が起きている」 | その牡蠣は“あたらない”らしい…
食中毒の心配なしに食べられる「あたらない牡蠣」の生産を目指し、沖縄県・久米島で開発が進む牡蠣の陸上養殖。日本と同じく生牡蠣を愛する国、フランスの「ル・モンド」紙特派員が久米島へ、世界初の試みの現場を訪ねた。 プレハブの事務所、いけすのある温室、謎めいたコンクリートの建物……。日本の南端にある小さな島…
Posted from: this blog via Microsoft Power Automate.
忙しい中で仕事を効率よく切り上げ、「自分の時間」を楽しむために私が工夫していること #趣味と仕事 – りっすん by イーアイデム
出勤日は仕事ばかりで1日が終わり、せっかくの休みも疲れでぐったり……。忙しく働く中で、そんなふうに過ごしている人は少なくないでしょう。 スタートアップ企業で働く会社員でブロガーの円錐さんも、かつてはそんな余裕のない日々を送っていました。しかし大好きな趣味ができたことから、「平日も休日も自分の時間を楽…
Posted from: this blog via Microsoft Power Automate.
「日本料理がおいしいの日本人が慣れてるだけ」「日本料理は切っただけ煮ただけ焼いただけでスパイスが貧弱」に反論が集まった話
なも@また凍結 @namosyotakon4 日本の食事は世界一美味しいみたいな言説かなり疑問視してる 出身地が日本で日本の料理に慣れているから一番美味しく感じるだけでしょ 2024-02-14 19:42:58 なも@また凍結 @namosyotakon4 補足しますと、日本人が食事をするなら日本の食事が世界で一番美味しいと思います。 しかしそれが外…
Posted from: this blog via Microsoft Power Automate.
ねぇ、本当に歳をとった!!!!
すごくセックスしたい!!が、相手がマジでいない!!!! 若い頃は楽だったなー。 若い頃はな… 一軒目が終わるくらいの夜の繁華街で、公園で1人、花壇のふちに腰掛けて、タバコを吹かしてれば、いくらでも声がかかった。 道行く人で好みのタイプがいれば、じっと見つめてみれば、相手から声をかけてくれた。 バーに入っ…
Posted from: this blog via Microsoft Power Automate.
はてな匿名ダイアリー内のキーワードリンクが表示されない不具合を修正しました – はてラボ 開発者ブログ
2/15(木)11時頃~2/16(金)10時頃まで、はてな匿名ダイアリー内のキーワードリンクが表示されない不具合が発生しておりました。 現在は修正済みです。 今後ともはてな匿名ダイアリーをよろしくお願いいたします。 anond.hatelabo.jp
Posted from: this blog via Microsoft Power Automate.
