使用html 和javascript 实现微信界面功能2
1.功能说明:
对上一篇的基础上进行了稍稍改造
主要修改点:
搜索功能:
在搜索框后面增加了搜索按钮。
搜索按钮调用performSearch函数来执行搜索操作。
表单形式的功能:
上传文件: 修改为表单形式,允许用户通过文件输入控件选择文件并上传。
发布朋友圈: 修改为表单形式,允许用户输入朋友圈内容并发布。
展示视频: 修改为表单形式,允许用户输入视频URL并展示。
2.代码展示
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>简易版微信</title><style>body {font-family: Arial, sans-serif;display: flex;justify-content: center;align-items: center;height: 100vh;margin: 0;background-color: #f5f5f5;}.container {width: 80%;max-width: 1200px;background: white;border-radius: 10px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);overflow: hidden;display: flex;}.sidebar {width: 25%;background: #e9ecef;padding: 20px;box-sizing: border-box;}.main-content {width: 75%;padding: 20px;box-sizing: border-box;}.search-area {margin-bottom: 20px;display: flex;align-items: center;}.search-area input {width: calc(100% - 80px);padding: 10px;border: 1px solid #ddd;border-radius: 5px;outline: none;}.search-area button {padding: 10px 20px;border: none;background: #07c160;color: white;cursor: pointer;border-radius: 5px;margin-left: 10px;}.search-area button:hover {background: #06a352;}.friends-list, .favorites-list, .files-list, .moments-list, .videos-list {margin-top: 20px;}.item {padding: 10px;border-bottom: 1px solid #ddd;cursor: pointer;}.item:last-child {border-bottom: none;}.item:hover {background: #f1f1f1;}.video-item video {width: 100%;border-radius: 10px;}.disabled {opacity: 0.5;pointer-events: none;}.messages {max-height: 300px;overflow-y: auto;border-bottom: 1px solid #ddd;padding-bottom: 10px;}.message {margin-bottom: 10px;}.message.user {text-align: right;}.message.bot {text-align: left;}.input-area {display: flex;border-top: 1px solid #ddd;}.input-area input {flex-grow: 1;padding: 10px;border: none;outline: none;}.input-area button {padding: 10px;border: none;background: #07c160;color: white;cursor: pointer;}.input-area button:hover {background: #06a352;}.confirmation-message {margin-top: 20px;padding: 10px;background: #ffcccc;border: 1px solid #ff4d4d;border-radius: 5px;}.confirmation-message p {margin: 0;}.confirmation-buttons button {margin-right: 10px;}.friend-details img {width: 50px;height: 50px;border-radius: 50%;object-fit: cover;margin-right: 10px;}.form-group {margin-bottom: 15px;}.form-group label {display: block;margin-bottom: 5px;}.form-group input,.form-group textarea,.form-group select {width: 100%;padding: 10px;border: 1px solid #ddd;border-radius: 5px;outline: none;}.form-group button {padding: 10px 20px;border: none;background: #07c160;color: white;cursor: pointer;border-radius: 5px;}.form-group button:hover {background: #06a352;}.preview-image {width: 100px;height: 100px;border-radius: 50%;object-fit: cover;margin-top: 10px;}</style>
</head>
<body><div class="container"><div class="sidebar"><h3>搜索</h3><div class="search-area"><input type="text" id="searchInput" placeholder="搜索..."><button onclick="performSearch()">搜索</button></div><h3>好友</h3><div class="friends-list" id="friendsList"><div class="item" onclick="showFriends()">查看好友</div></div><h3>收藏</h3><div class="favorites-list" id="favoritesList"><div class="item" onclick="showFavorites()">查看收藏</div></div><h3>文件</h3><div class="files-list" id="filesList"><div class="item" onclick="showFiles()">查看文件</div></div><h3>朋友圈</h3><div class="moments-list" id="momentsList"><div class="item" onclick="showMoments()">查看朋友圈</div></div><h3>视频号</h3><div class="videos-list" id="videosList"><div class="item" onclick="showVideos()">查看视频</div></div></div><div class="main-content"><h2 id="contentTitle">主界面</h2><div id="contentArea"></div></div></div><script>let friends = [];let favorites = [];let files = [];let moments = [];let videos = [];let confirmationCallback = null;function generateUniqueId() {return Math.random().toString(36).substr(2, 9);}function addFriendForm() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>添加好友</h3><form id="addFriendForm"><div class="form-group"><label for="friendNickname">网名:</label><input type="text" id="friendNickname" required></div><div class="form-group"><label for="friendAge">年龄:</label><input type="number" id="friendAge" min="1" required></div><div class="form-group"><label for="friendGender">性别:</label><select id="friendGender" required><option value="">请选择...</option><option value="male">男</option><option value="female">女</option><option value="other">其他</option></select></div><div class="form-group"><label for="friendAddress">地址:</label><input type="text" id="friendAddress" required></div><div class="form-group"><label for="friendAvatar">头像:</label><input type="file" id="friendAvatar" accept="image/*" required><img id="avatarPreview" class="preview-image" src="" alt="Avatar Preview" style="display:none;"></div><button type="submit">添加好友</button></form>`;document.getElementById('friendAvatar').addEventListener('change', function(event) {const file = event.target.files[0];if (file) {const reader = new FileReader();reader.onload = function(e) {const previewImage = document.getElementById('avatarPreview');previewImage.src = e.target.result;previewImage.style.display = 'block';};reader.readAsDataURL(file);}});document.getElementById('addFriendForm').onsubmit = (event) => {event.preventDefault();const nickname = document.getElementById('friendNickname').value;const age = parseInt(document.getElementById('friendAge').value);const gender = document.getElementById('friendGender').value;const address = document.getElementById('friendAddress').value;const avatarFile = document.getElementById('friendAvatar').files[0];if (!avatarFile) {showMessage('请上传头像');return;}const friendId = generateUniqueId();const reader = new FileReader();reader.onloadend = () => {const avatarUrl = reader.result;friends.push({ id: friendId, nickname, age, gender, address, avatar: avatarUrl, blocked: false });showMessage(`已添加好友 ${nickname}`);showFriends();};reader.readAsDataURL(avatarFile);};}function deleteFriend(index) {confirmationCallback = () => {friends.splice(index, 1);showFriends();};showConfirmation(`确定要删除 ${friends[index].nickname} 吗?`);}function blockFriend(index) {friends[index].blocked = !friends[index].blocked;showMessage(`已将 ${friends[index].nickname} ${friends[index].blocked ? '拉黑' : '取消拉黑'}`);showFriends();}function addToFavoritesForm() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>添加收藏</h3><form id="addFavoriteForm"><div class="form-group"><label for="favoriteContent">收藏内容:</label><textarea id="favoriteContent" rows="4" required></textarea></div><button type="submit">添加收藏</button></form>`;document.getElementById('addFavoriteForm').onsubmit = (event) => {event.preventDefault();const content = document.getElementById('favoriteContent').value;if (content) {favorites.push({ content, likes: 0 });showMessage(`已添加收藏`);showFavorites();}};}function deleteFavorite(index) {confirmationCallback = () => {favorites.splice(index, 1);showFavorites();};showConfirmation(`确定要删除此收藏吗?`);}function likeFavorite(index) {favorites[index].likes++;showFavorites();}function uploadFileForm() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>上传文件</h3><form id="uploadFileForm"><div class="form-group"><label for="fileUpload">选择文件:</label><input type="file" id="fileUpload" required></div><button type="submit">上传文件</button></form>`;document.getElementById('uploadFileForm').onsubmit = (event) => {event.preventDefault();const fileInput = document.getElementById('fileUpload');const file = fileInput.files[0];if (file) {files.push(file);showMessage(`${file.name} 已上传`);showFiles();}};}function downloadFile(index) {const file = files[index];const url = URL.createObjectURL(file);const a = document.createElement('a');a.href = url;a.download = file.name;document.body.appendChild(a);a.click();a.remove();}function deleteFile(index) {confirmationCallback = () => {files.splice(index, 1);showFiles();};showConfirmation(`确定要删除此文件吗?`);}function postMomentForm() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>发布朋友圈</h3><form id="postMomentForm"><div class="form-group"><label for="momentContent">朋友圈内容:</label><textarea id="momentContent" rows="4" required></textarea></div><button type="submit">发布朋友圈</button></form>`;document.getElementById('postMomentForm').onsubmit = (event) => {event.preventDefault();const content = document.getElementById('momentContent').value;if (content) {moments.push({ content, likes: 0 });showMessage(`已发布朋友圈`);showMoments();}};}function deleteMoment(index) {confirmationCallback = () => {moments.splice(index, 1);showMoments();};showConfirmation(`确定要删除此朋友圈吗?`);}function likeMoment(index) {moments[index].likes++;showMoments();}function showVideoForm() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>展示视频</h3><form id="showVideoForm"><div class="form-group"><label for="videoUrl">视频URL:</label><input type="url" id="videoUrl" required></div><button type="submit">展示视频</button></form>`;document.getElementById('showVideoForm').onsubmit = (event) => {event.preventDefault();const videoUrl = document.getElementById('videoUrl').value;if (videoUrl) {videos.push({ url: videoUrl, likes: 0 });showMessage(`已添加视频`);showVideos();}};}function deleteVideo(index) {confirmationCallback = () => {videos.splice(index, 1);showVideos();};showConfirmation(`确定要删除此视频吗?`);}function likeVideo(index) {videos[index].likes++;showVideos();}function updateFriendsList() {const friendsList = document.getElementById('friendsList');friendsList.innerHTML = `<div class="item" οnclick="showFriends()">查看好友</div>`;if (friends.length > 0) {friends.forEach((friend, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${friend.nickname} (${friend.age}) ${friend.blocked ? '(已拉黑)' : ''}`;item.onclick = () => showFriendDetails(index);friendsList.appendChild(item);});}}function updateFavoritesList() {const favoritesList = document.getElementById('favoritesList');favoritesList.innerHTML = `<div class="item" οnclick="showFavorites()">查看收藏</div>`;if (favorites.length > 0) {favorites.forEach((favorite, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${favorite.content.substring(0, 50)}... (${favorite.likes} 点赞)`;item.onclick = () => showFavoriteDetails(index);favoritesList.appendChild(item);});}}function updateFilesList() {const filesList = document.getElementById('filesList');filesList.innerHTML = `<div class="item" οnclick="showFiles()">查看文件</div>`;if (files.length > 0) {files.forEach((file, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${file.name}`;item.onclick = () => showFileDetails(index);filesList.appendChild(item);});}}function updateMomentsList() {const momentsList = document.getElementById('momentsList');momentsList.innerHTML = `<div class="item" οnclick="showMoments()">查看朋友圈</div>`;if (moments.length > 0) {moments.forEach((moment, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${moment.content.substring(0, 50)}... (${moment.likes} 点赞)`;item.onclick = () => showMomentDetails(index);momentsList.appendChild(item);});}}function updateVideosList() {const videosList = document.getElementById('videosList');videosList.innerHTML = `<div class="item" οnclick="showVideos()">查看视频</div>`;if (videos.length > 0) {videos.forEach((video, index) => {const item = document.createElement('div');item.className = 'item';item.innerHTML = `<video src="${video.url}" controls></video> (${video.likes} 点赞)`;item.onclick = () => showVideoDetails(index);videosList.appendChild(item);});}}function showFriends() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>好友列表</h3><button οnclick="addFriendForm()">添加好友</button><div id="friendsContent"></div>`;const friendsContent = document.getElementById('friendsContent');friends.forEach((friend, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${friend.nickname} (${friend.age}) ${genderMap[friend.gender]} ${friend.blocked ? '(已拉黑)' : ''}`;item.onclick = () => showFriendDetails(index);friendsContent.appendChild(item);});}function showFriendDetails(index) {const friend = friends[index];const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>${friend.nickname}</h3><div class="friend-details"><img src="${friend.avatar}" alt="${friend.nickname}'s Avatar"><p>年龄: ${friend.age}</p><p>性别: ${genderMap[friend.gender]}</p><p>地址: ${friend.address}</p><p>状态: ${friend.blocked ? '已拉黑' : '正常'}</p><button οnclick="chatWithFriend(${index})" ${friend.blocked ? 'class="disabled"' : ''}>聊天</button><button οnclick="deleteFriend(${index})">删除好友</button><button οnclick="blockFriend(${index})">${friend.blocked ? '取消拉黑' : '拉黑好友'}</button></div>`;}function chatWithFriend(index) {const friend = friends[index];if (friend.blocked) {showMessage('无法与已拉黑的好友聊天');return;}const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>与 ${friend.nickname} 聊天</h3><div class="messages" id="friendMessages"></div><div class="input-area"><input type="text" id="friendMessageInput" placeholder="输入消息..."><button οnclick="sendFriendMessage(${index})">发送</button></div>`;}function sendFriendMessage(index) {const friendMessageInput = document.getElementById('friendMessageInput');const friendMessagesContainer = document.getElementById('friendMessages');const userMessage = friendMessageInput.value.trim();if (userMessage === '') return;// 创建用户消息元素const userMessageElement = document.createElement('div');userMessageElement.className = 'message user';userMessageElement.textContent = userMessage;friendMessagesContainer.appendChild(userMessageElement);// 添加撤回按钮const revokeButton = document.createElement('button');revokeButton.textContent = '撤回';revokeButton.onclick = () => {friendMessagesContainer.removeChild(userMessageElement);};userMessageElement.appendChild(revokeButton);// 清空输入框friendMessageInput.value = '';// 模拟好友回复setTimeout(() => {const friendReply = `收到:${userMessage}`;const friendMessageElement = document.createElement('div');friendMessageElement.className = 'message bot';friendMessageElement.textContent = friendReply;friendMessagesContainer.appendChild(friendMessageElement);// 自动滚动到底部friendMessagesContainer.scrollTop = friendMessagesContainer.scrollHeight;}, 1000);}function showFavoriteDetails(index) {const favorite = favorites[index];const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>收藏内容</h3><p>${favorite.content}</p><p>点赞数: ${favorite.likes}</p><button οnclick="likeFavorite(${index})">点赞</button><button οnclick="deleteFavorite(${index})">删除收藏</button>`;}function showFileDetails(index) {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>文件详情</h3><p>文件名: ${files[index].name}</p><button οnclick="downloadFile(${index})">下载文件</button><button οnclick="deleteFile(${index})">删除文件</button>`;}function showMomentDetails(index) {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>朋友圈内容</h3><p>${moments[index].content}</p><p>点赞数: ${moments[index].likes}</p><button οnclick="likeMoment(${index})">点赞</button><button οnclick="deleteMoment(${index})">删除朋友圈</button>`;}function showVideoDetails(index) {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>视频详情</h3><video src="${videos[index].url}" controls></video><p>点赞数: ${videos[index].likes}</p><button οnclick="likeVideo(${index})">点赞</button><button οnclick="deleteVideo(${index})">删除视频</button>`;}function showFavorites() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>收藏内容列表</h3><button οnclick="addToFavoritesForm()">新增收藏内容</button><div id="favoritesContent"></div>`;const favoritesContent = document.getElementById('favoritesContent');favorites.forEach((favorite, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${favorite.content.substring(0, 50)}... (${favorite.likes} 点赞)`;item.onclick = () => showFavoriteDetails(index);favoritesContent.appendChild(item);});}function showFiles() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>文件列表</h3><button οnclick="uploadFileForm()">上传文件</button><div id="filesContent"></div>`;const filesContent = document.getElementById('filesContent');files.forEach((file, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${file.name}`;item.onclick = () => showFileDetails(index);filesContent.appendChild(item);});}function showMoments() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>朋友圈列表</h3><button οnclick="postMomentForm()">发布朋友圈</button><div id="momentsContent"></div>`;const momentsContent = document.getElementById('momentsContent');moments.forEach((moment, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${moment.content.substring(0, 50)}... (${moment.likes} 点赞)`;item.onclick = () => showMomentDetails(index);momentsContent.appendChild(item);});}function showVideos() {const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>视频列表</h3><button οnclick="showVideoForm()">展示视频</button><div id="videosContent"></div>`;const videosContent = document.getElementById('videosContent');videos.forEach((video, index) => {const item = document.createElement('div');item.className = 'item';item.innerHTML = `<video src="${video.url}" controls></video> (${video.likes} 点赞)`;item.onclick = () => showVideoDetails(index);videosContent.appendChild(item);});}function showConfirmation(message) {const contentArea = document.getElementById('contentArea');contentArea.innerHTML += `<div class="confirmation-message" id="confirmationMessage"><p>${message}</p><div class="confirmation-buttons"><button οnclick="confirmAction()">确认</button><button οnclick="cancelAction()">取消</button></div></div>`;}function confirmAction() {if (confirmationCallback) {confirmationCallback();confirmationCallback = null;}hideConfirmation();}function cancelAction() {confirmationCallback = null;hideConfirmation();}function hideConfirmation() {const confirmationMessage = document.getElementById('confirmationMessage');if (confirmationMessage) {confirmationMessage.remove();}}function showMessage(message) {const contentArea = document.getElementById('contentArea');contentArea.innerHTML += `<div class="confirmation-message" id="confirmationMessage"><p>${message}</p></div>`;setTimeout(hideConfirmation, 3000); // Hide after 3 seconds}function searchFriends(query) {const filteredFriends = friends.filter(friend =>friend.nickname.toLowerCase().includes(query.toLowerCase()));const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>搜索结果</h3><div id="searchResults"></div>`;const searchResults = document.getElementById('searchResults');if (filteredFriends.length > 0) {filteredFriends.forEach((friend, index) => {const item = document.createElement('div');item.className = 'item';item.textContent = `${friend.nickname} (${friend.age}) ${genderMap[friend.gender]} ${friend.blocked ? '(已拉黑)' : ''}`;item.onclick = () => showSearchFriendDetails(filteredFriends, index);searchResults.appendChild(item);});} else {searchResults.innerHTML = '<p>没有找到匹配的好友</p>';}}function performSearch() {const query = document.getElementById('searchInput').value;if (query.trim()) {searchFriends(query);} else {showFriends(); // Reset to full list if search is cleared}}function showSearchFriendDetails(filteredFriends, index) {const friend = filteredFriends[index];const contentArea = document.getElementById('contentArea');contentArea.innerHTML = `<h3>${friend.nickname}</h3><div class="friend-details"><img src="${friend.avatar}" alt="${friend.nickname}'s Avatar"><p>年龄: ${friend.age}</p><p>性别: ${genderMap[friend.gender]}</p><p>地址: ${friend.address}</p><p>状态: ${friend.blocked ? '已拉黑' : '正常'}</p><button οnclick="chatWithFriend(${friends.indexOf(friend)})" ${friend.blocked ? 'class="disabled"' : ''}>聊天</button><button οnclick="deleteFriend(${friends.indexOf(friend)})">删除好友</button><button οnclick="blockFriend(${friends.indexOf(friend)})">${friend.blocked ? '取消拉黑' : '拉黑好友'}</button></div>`;}// Gender mappingconst genderMap = {male: '男',female: '女',other: '其他'};// 初始化列表updateFriendsList();updateFavoritesList();updateFilesList();updateMomentsList();updateVideosList();</script>
</body>
</html>
3.效果展示
相关文章:

使用html 和javascript 实现微信界面功能2
1.功能说明: 对上一篇的基础上进行了稍稍改造 主要修改点: 搜索功能: 在搜索框后面增加了搜索按钮。 搜索按钮调用performSearch函数来执行搜索操作。 表单形式的功能: 上传文件: 修改为表单形式,允许用户通过文件输入控件选择文件并上传。 …...
虚幻引擎Actor类生命周期
AActor构造函数 在AActor类的构造函数中,虚幻引擎会初始化与该Actor相关的一些关键属性,比如: 默认的组件(如RootComponent、MeshComponent等)。默认的属性设置,例如位置、旋转、缩放等。还会调用BeginPlay等生命周期函数,但在构造函数中,这些函数不会执行。当你在场景…...

记录2024-leetcode-字符串DP
10. 正则表达式匹配 - 力扣(LeetCode)...
爬虫获取的数据如何有效存储和管理?
爬虫获取的数据如何有效存储和管理,涉及到数据的采集、存储、清洗、分析和保护等多个方面。以下是一些关键步骤和最佳实践: 1. 数据采集与同步 API接口同步:通过API接口将数据从数据源传输到目标位置,并保持数据的一致性和完整性…...

[Unity] AppLovin Max接入Native 广告 IOS篇
NativeIOS构建流程 (接入之前备份之前打包得Xcode工程) 下载资源 1.将以下文件放入Unity Assets->Plugins->IOS文件夹下 2.Unity更新max版本至12.4.1 UnityPlugin 6.4.3以上(很重要) 3.NativeSDKManager.CS根据以下附…...

康耐视智能相机(Insight)通过ModbusTCP发送字符串到倍福(BECKHOFF)PLC中
文章目录 1.背景2.分析3.实现3.1.PLC的ModbusTCP_Server3.1.1.安装TF6250-Modbus-TCP3.1.2.PLC设置 3.2.智能相机的ModbusTCP_Client3.2.1.了解ModbusTCP的协议3.2.2.根据协议写代码3.2.2.1.纯函数代码3.2.2.2.脚本代码 3.2.3.非脚本处理时的代码逻辑图3.2.4.关于代码的问题及解…...
TIFS投稿记录(IEEE Transactions on Information Forensics Security)
毕竟是CCF A类期刊,TIFS审稿有点慢,记录最近一篇论文的投稿时间线。 2024年10月27日:提交。 2024年11月12日:分配DE。 2024年12月3日:AE与SAE还未分配。发邮件催了催。 2024年12月5日:SAE已分配。AE: Not A…...

极越汽车,加速跌落
文丨梅元知 9月,极越销量2605辆;10月进一步攀升到3107辆,尽管11月略有回落,销量跌至2485辆,但对于一个品牌影响力尚未完全建立、销售渠道有限的新品牌而言,这样的表现已实属不易。然而,就在看似…...
深入解析MySQL事务隔离级别与锁机制在银行账户业务中的应用
一、引言 在金融行业,尤其是银行账户业务中,数据的一致性和安全性至关重要。MySQL作为一种广泛使用的数据库,其事务隔离级别和锁机制在保证数据一致性方面发挥着重要作用。本文将针对银行账户查询与转账业务,探讨如何运用事务锁来…...

postman可以通的请求,前端通不了(前端添加Content-type,后端收不到请求)
接口完成之后,自己使用postman测试了一下,没有问题; 可是在和小组前端调试接口的时候,他却说访问不了; 信息如下:(我自己写的一个打印请求信息的拦截器) 发现报错信息是: Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported 也就是说…...

【Java计算机毕业设计】基于SSM+VUE宠物领养管理系统【源代码+数据库+LW文档+开题报告+答辩稿+部署教程+代码讲解】
源代码数据库LW文档(1万字以上)开题报告答辩稿 部署教程代码讲解代码时间修改教程 一、开发工具、运行环境、开发技术 开发工具 1、操作系统:Window操作系统 2、开发工具:IntelliJ IDEA或者Eclipse 3、数据库存储:…...
排队论、负载均衡和任务调度关系
目录 排队论、负载均衡和任务调度关系 一、排队论 二、负载均衡 三、任务调度 四、总结 排队论、负载均衡和任务调度关系 排队论为负载均衡和任务调度提供了数学理论和方法支持 排队论、负载均衡和任务调度是三个相关但不同的概念。以下是对这三个概念的详细解释和它们之…...

智能客户服务:科技赋能下的新体验
在当今这个数字化时代,客户服务已经不仅仅是简单的售后服务,它已竞争的关键要素之一。随着人工智能、大数据、云计算等技术的飞速发展,智能客户服务正逐步改变着传统的服务模式,为企业和消费者带来了前所未有的新体验。 一、智能客…...
代码随想录第45天
115.不同的子序列 class Solution:def numDistinct(self, s: str, t: str) -> int:n1 len(s)n2 len(t)dp [[0] * (n1 1) for _ in range(n2 1)]for j in range(n1 1):dp[0][j] 1for i in range(1, n2 1):for j in range(1, n1 1):if t[i - 1] s[j - 1]:dp[i][j]…...

前端项目初始化搭建(二)
一、使用 Vite 创建 Vue 3 TypeScript 项目 PS E:\web\cursor-project\web> npm create vitelatest yf-blog -- --template vue-ts> npx > create-vite yf-blog --template vue-tsScaffolding project in E:\web\cursor-project\web\yf-blog...Done. Now run:cd yf-…...
3D 目标检测:从萌芽到前沿的技术演进之路
亲爱的小伙伴们😘,在求知的漫漫旅途中,若你对深度学习的奥秘、JAVA 、PYTHON与SAP 的奇妙世界,亦或是读研论文的撰写攻略有所探寻🧐,那不妨给我一个小小的关注吧🥰。我会精心筹备,在…...

Apifox 产品更新|支持发布多个文档站、文档站支持 Algolia 搜索配置、从返回响应直接设置断言
看看本次 这次版本更新主要涵盖的重点内容,有没有你所关注的功能特性: 「发布文档」升级为「发布文档站」 支持发布多个文档站 文档站支持 Algolia 搜索配置 支持从返回响应直接设置断言 用户反馈优化 解决恢复退出 App 时未关闭的标签页可能导致内存…...

Linux内核结构及源码概述
参考:深入分析LINUX内核源码 深入分析Linux内核源码 (kerneltravel.net) Linux 是一个庞大、高效而复杂的操作系统,虽然它的开发起始于 Linus Torvalds 一个人,但随着时间的推移,越来越多的人加入了 Linux 的开发和对它的不断完善…...
《探索C++在3D重建中的算法与技术要点》
3D重建作为计算机视觉领域的重要技术,在诸多行业有着广泛应用,而C以其高效性和对底层硬件的良好控制,成为实现3D重建算法的常用语言。以下是利用C进行3D重建的一些常见算法和技术要点。 多视图立体视觉算法 多视图立体视觉是3D重建的基础算…...

【老白学 Java】数字格式化
数字格式化 文章来源:《Head First Java》修炼感悟。 很多时候需要对数字或日期进行格式化操作,来达到某些输出效果。Java 的 Formatter 类提供了很多扩展性功能用于字符串的格式化,只要调用 String 静态方法 format() ,传入参数…...
useCallback和forwardRef的联合使用
文章目录 一、useCallback二、forwardRef 总结了useCallback、forwardRef中的deps,以及操作子组建时会遇到数据流不同步的问题 一、useCallback useCallback可以缓存函数,这样避免组建更新导致的函数重建;useCallback在函数更新以后会在deps中…...
C# .NET CORE 开发问题汇总
1. error MSB4803: .NET Core 版本的 MSBuild 不支持“ResolveComReference”。请使用 .NET Framework 版本的 MSBuild。 引用了一个COM组件, 使用donet 命令时,提示不支持, 可以先将项目设置为x86以构建, 将COM引用添加到核心项目中,构建它,在obj\x86\…...
【C语言】拆数字组成最大数
相信你是最棒哒!!! 文章目录 题目描述 正确代码 法一注释版 简洁版 法二注释版 简洁版 题目描述 任意输入一个自然数,输出该自然数的各位数字组成的最大数。例如,输入 1593 ,则输出为 9531 。 输入描述 …...

【Git系列】根据提交打印邮箱
💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…...

Nginx在处理客户端请求的并发性发面是否依赖Linux的多线程原理
Nginx在处理客户端请求的并发性发面是否依赖Linux的多线程原理 Nginx 在处理客户端请求的并发性方面,并不依赖于 Linux 的多线程原理。 Nginx 的并发处理主要基于 事件驱动模型 和 异步非阻塞 I/O,而不是传统的多线程或多进程模型。 Nginx 的并发处理模…...

Python生成对抗神经网络GAN预测股票及LSTMs、ARIMA对比分析ETF金融时间序列可视化
全文链接:https://tecdat.cn/?p38528 本文聚焦于利用生成对抗网络(GANs)进行金融时间序列的概率预测。介绍了一种新颖的基于经济学驱动的生成器损失函数,使 GANs 更适用于分类任务并置于监督学习环境中,能给出价格回…...
深入了解C++中const的用法
文章目录 一、C中的const如何理解?二、C中的const与C语言中的const有何区别?三、const与指针、引用的结合使用 一、C中的const如何理解? 在C中,const是一个关键字,用来表示常量性,意在告诉编译器某些变量或…...
【Linux金典面试题(上)】41道Linux金典面试问题+详细解答,包含基本操作、系统维护、网络配置、脚本编程等问题。
大家好,我是摇光~,用大白话讲解所有你难懂的知识点 之前写了一篇关于 python 的面试题,感觉大家都很需要,所以打算出一个面试专栏。 【数据分析岗】Python金典面试题 这个专栏主要针对面试大数据岗位、数据分析岗位、数据运维等…...
利用Python实现多元回归预测汽车价格
引言: AI技术的热门使得大家对机器学习有了更多的关注,作为与AI技术息息相关的一门课程,从头了解基础的机器学习算法就显得十分有必要,如:梯度下降,线性回归等。 正文: 本文将讲解线性回归中多元回回归的案例 机器学习大致可以分为监督学习,非监督学习、半监督学习还…...
抓包软件fiddler和wireshark使用手册
fiddler官方文档 Fiddler 抓包教程1 Fiddler 抓包教程2 wireshark抓包学习 2添加链接描述 ip 过滤 ip.src_host ip.dst_host ip.addr mac 过滤 eth.src eth.dst eth.addr 端口过滤 tcp.port tcp.srcport tcp.dstport 协议类型过滤 arp dhcp 规则组合 and or...