11-Django项目--Ajax请求二

目录

模版:

demo_list.html

perform_list.html

数据库操作: 

路由:

视图函数:

Ajax_data.py

perform.py


模版:

demo_list.html

{% extends "index/index.html" %}
{% load static %}
# 未实现修改,删除操作{% block content %}<div class="container"><h1>Ajax演示-one</h1><input type="button" id="button-one" class="btn btn-success" value="点我"><hr><table border="1"><thead><th>一级分类</th><th>二级分类</th><th>名称</th></thead><tbody id="tBody" align="center"></tbody></table><h1>Ajax演示-two</h1><input type="text" id="username" placeholder="请输入账号"><input type="text" id="password" placeholder="请输入账号"><input type="button" id="button-two" class="btn btn-success" value="点我"><hr><h1>Ajax演示-three</h1><form id="form-three"><input type="text" id="name" placeholder="姓名"><input type="text" id="age" placeholder="年龄"><input type="text" id="love" placeholder="爱好"></form><input type="button" id="button-three" class="btn btn-success" value="点我"><hr></div><hr>{# 添加数据 #}<div class="container"><div class="panel panel-warning"><div class="panel-heading"><h3 class="panel-title">任务列表</h3></div><div class="panel-body clearfix"><form id="formAdd">{% for field in form %}<div class="col-xs-6"><label for="">{{ field.label }}</label>{{ field }}<span id="con-msg" style="color: red; position: absolute;margin-left: 80px">{{ field.errors }}</span></div>{% endfor %}<div class="col-xs-12"><button type="button" id="btnAdd" class="btn btn-success">提交</button></div></form></div></div></div>{#展示数据#}<div class="container"><div class="panel panel-danger"><div class="panel-heading"><h3 class="panel-title">任务展示</h3></div><div class="panel-body"><table class="table table-bordered"><thead><tr><th>任务ID</th><th>任务标题</th><th>任务级别</th><th>任务内容</th><th>负责人</th><th>开始时间</th><th>任务状态</th><th>操作</th></tr></thead><tbody>{% for data in queryset %}<tr><th>{{ data.id }}</th><th>{{ data.title }}</th><th>{{ data.get_level_display }}</th><th>{{ data.detail }}</th><th>{{ data.user.name }}</th><th>{{ data.times }}</th><th>{{ data.get_code_display }}</th><th><a href="#">删除</a><a href="#">修改</a></th></tr>{% endfor %}</tbody></table></div></div></div>
{% endblock %}{% block js %}<script>// 函数调用$(function () {bindBtnOne();bindBtnTwo();bindBtnThree();bindBtnEvent();})function bindBtnOne() {// 通过id属性,找见某个标签,之后再点击的时候,触发一个函数$("#button-one").click(function () {//在点击这个按钮的时候,进行一次数据提交$.ajax({// 请求地址url: "/demo/one/",// 请求类型type: "post",// 表单数据data: {type: "text",love: "lanqiu"},// 如果请求成功,则接受后端传输过来的数据success: function (res) {var list = res.list;var htmlStr = "";for (var i = 0; i < list.length; i++) {var emp = list[i]/*<tr><td>水果</td><td>水果</td><td>水果</td></tr>*/htmlStr += "<tr>";htmlStr += "<td>" + emp.prodCat + "</td>"htmlStr += "<td>" + emp.prodPcat + "</td>"htmlStr += "<td>" + emp.prodName + "</td>"htmlStr += "</tr>";// 通过id定位到一个标签,将html内容添加进去document.getElementById("tBody").innerHTML = htmlStr;}}})})}function bindBtnTwo() {// 通过id属性,找见某个标签,之后再点击的时候,触发一个函数$("#button-two").click(function () {//在点击这个按钮的时候,进行一次数据提交$.ajax({// 请求地址url: "/demo/two/",// 请求类型type: "post",// 表单数据data: {username: $("#username").val(),password: $("#password").val()},// 如果请求成功,则接受后端传输过来的数据success: function (res) {alert(res)}})})}function bindBtnThree() {// 通过id属性,找见某个标签,之后再点击的时候,触发一个函数$("#button-three").click(function () {//在点击这个按钮的时候,进行一次数据提交$.ajax({// 请求地址url: "/demo/two/",// 请求类型type: "post",// 表单数据data: $("#form-three").serialize(),// 如果请求成功,则接受后端传输过来的数据success: function (res) {console.log(res)}})})}function bindBtnEvent() {// 通过id属性,找见某个标签,之后再点击的时候,触发一个函数$("#btnAdd").click(function () {// 清空错误信息$("#con-msg").empty();//在点击这个按钮的时候,进行一次数据提交$.ajax({// 请求地址url: "/demo/add/",// 请求类型type: "post",// 表单数据data: $("#formAdd").serialize(),// 如果请求成功,则接受后端传输过来的数据datatype:"JSON",success: function (res) {if(res.status){alert("添加成功");// 刷新页面location.reload();}else {{#console.log(res.error);#}// each 遍历字典error,将键和值给到函数// 将所有的异常,分配带每个框 name是error当中的键,data是error当中的值$.each(res.error, function (name, data) {// 通过id值,找到输入框,将错误信息展示在输入框的附近$("#id_"+name).next().text(data[0])})}}})})}</script>
{% endblock %}

perform_list.html

 未做修改.

{% extends "index/index.html" %}{% block content %}<div class="container"><!-- Button trigger modal --><button type="button" class="btn btn-success btn-lg" id="btnAdd">新生入学</button><!-- Modal --><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><spanaria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">添加信息</h4></div><div class="modal-body"><form id="formAdd"><div class="clearfix">{% for field in form %}<div class="col-xs-6"><label for="">{{ field.label }}</label>{{ field }}<span id="con-msg"style="color: red; position: absolute;margin-left: 80px">{{ field.errors }}</span></div>{% endfor %}</div></form></div><div class="modal-footer"><button type="button" class="btn btn-warning" data-dismiss="modal">Close</button><button type="button" class="btn btn-success" id="btnSave">Save</button></div></div></div></div></div>{# 内容展示 #}<div class="container" style="margin-top: 10px"><div class="panel panel-success"><div class="panel-heading"><h3 class="panel-title">新生列表</h3></div><div class="panel-body"><table class="table table-bordered"><thead><tr><th>ID</th><th>订单号</th><th>来源</th><th>姓名</th><th>日期</th><th>学费</th><th>销售</th><th>操作</th></tr></thead><tbody>{% for data in queryset %}<tr class="success"><th>{{ data.id }}</th><th>{{ data.oid }}</th><th>{{ data.source }}</th><th>{{ data.title }}</th><th>{{ data.times }}</th><th>{{ data.price }}</th><th>{{ data.name }}</th><th><button uid="{{ data.id }}" style="border: none" class="btn btn-danger btn-xs btn-delete">删除</button><button style="border: none" class="btn btn-info btn-xs">修改</button></th></tr>{% endfor %}</tbody></table></div></div></div>{# 删除警告框 #}<div class="modal fade" id="btnDelete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="alert alert-danger alert-dismissible fade in" role="alert" style="width: 500px"><h4>你要确认删除吗</h4><p>你要是删了,业绩可就没了</p><p><button type="button" class="btn btn-success" data-dismiss="modal">关闭</button><button type="button" class="btn btn-warning" id="contentDelete">删除</button></p></div></div></div>{% endblock %}{% block js %}<script>var DELETE_ID = undefined;$(function () {bindBtnAdd();bindBtnSave();bindBtnDelete();bindBtnDeleteContent();})function bindBtnAdd() {$("#btnAdd").click(function () {$("#myModal").modal("show")})}function bindBtnSave() {$("#btnAdd").click(function () {$("#btnSave").click(function () {$.ajax({url: "/parform/add/",type: "post",data: $("#formAdd").serialize(),dataType: "JSON",success: function (res) {if (res.status) {// 关闭窗口$("#myModal").modal("hide");location.reload();} else {$.each(res.error, function (name, data) {$("#id_" + name).next().text(data[0])})}}})})})}function bindBtnDelete() {$(".btn-delete").click(function () {$("#btnDelete").modal("show");{#console.log($(this).attr("uid"))#}DELETE_ID = $(this).attr("uid")})}function bindBtnDeleteContent() {$("#contentDelete").click(function () {$.ajax({url:"/parform/delete/",type:"get",dataType: "JSON",data:{uid:DELETE_ID},success:function (res) {if (res.status){$("#btnDelete").modal("hide");//删除对应的tr标签{#$("tr[uid='" + DELETE_ID + "']").remove(),#}location.reload()}}})})}</script>
{% endblock %}


数据库操作: 


路由:

 


视图函数:

Ajax_data.py

# -*- coding:utf-8 -*-
from django.shortcuts import render, redirect, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from demo_one import models
from django.http import JsonResponse
from django import forms
import jsonclass DemoModelFoem(forms.ModelForm):class Meta:model = models.Dempfields = "__all__"widgets = {"detail":forms.TextInput}def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)for name, field in self.fields.items():field.widget.attrs = {"class": "form-control", "autocomplete": "off"}@csrf_exempt
def demo_list(request):queryset = models.Demp.objects.all()form = DemoModelFoem()content = {"form": form,"queryset": queryset}return render(request, "Ajax-demo/demo_list.html",content)@csrf_exempt
def demo_add(request):form = DemoModelFoem(request.POST)if form.is_valid():form.save()dict_data = {"status": True}return JsonResponse(dict_data)dict_data = {"error": form.errors}return JsonResponse(dict_data)@csrf_exempt
def demo_one(request):dict_data = {"current": 1,"limit": 20,"count": 82215,"list": [{"id": 1623704,"prodName": "菠萝","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "2.0","highPrice": "3.0","avgPrice": "2.5","place": "","specInfo": "箱装(上六下六)","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623703,"prodName": "凤梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "3.5","highPrice": "5.5","avgPrice": "4.5","place": "国产","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623702,"prodName": "圣女果","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "4.0","highPrice": "5.0","avgPrice": "4.5","place": "","specInfo": "千禧","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623701,"prodName": "百香果","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "8.0","highPrice": "10.0","avgPrice": "9.0","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623700,"prodName": "九九草莓","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "6.0","highPrice": "12.0","avgPrice": "9.0","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623699,"prodName": "杨梅","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "8.0","highPrice": "19.0","avgPrice": "13.5","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623698,"prodName": "蓝莓","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "25.0","highPrice": "45.0","avgPrice": "35.0","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623697,"prodName": "火龙果","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "7.0","highPrice": "11.0","avgPrice": "9.0","place": "","specInfo": "红","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623696,"prodName": "火龙果","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "5.3","highPrice": "7.3","avgPrice": "6.3","place": "","specInfo": "白","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623695,"prodName": "木瓜","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "4.5","highPrice": "5.0","avgPrice": "4.75","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623694,"prodName": "桑葚","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "6.0","highPrice": "9.0","avgPrice": "7.5","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623693,"prodName": "柠檬","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "3.0","highPrice": "4.0","avgPrice": "3.5","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623692,"prodName": "姑娘果(灯笼果)","prodCatid": 1187,"prodCat": "水果","prodPcatid": 1211,"prodPcat": "其他类","lowPrice": "12.5","highPrice": "25.0","avgPrice": "18.75","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623691,"prodName": "鸭梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "1.8","highPrice": "2.0","avgPrice": "1.9","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623690,"prodName": "雪花梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "1.6","highPrice": "1.8","avgPrice": "1.7","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623689,"prodName": "皇冠梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "2.7","highPrice": "2.8","avgPrice": "2.75","place": "","specInfo": "纸箱","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623688,"prodName": "丰水梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "2.8","highPrice": "3.1","avgPrice": "2.95","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623687,"prodName": "酥梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "2.0","highPrice": "2.5","avgPrice": "2.25","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623686,"prodName": "库尔勒香梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "3.5","highPrice": "5.9","avgPrice": "4.7","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"},{"id": 1623685,"prodName": "红香酥梨","prodCatid": 1187,"prodCat": "水果","prodPcatid": "null","prodPcat": "梨类","lowPrice": "2.5","highPrice": "2.6","avgPrice": "2.55","place": "","specInfo": "","unitInfo": "斤","pubDate": "2024-06-04 00:00:00","status": "null","userIdCreate": 138,"userIdModified": "null","userCreate": "admin","userModified": "null","gmtCreate": "null","gmtModified": "null"}]}# return HttpResponse(json.dumps(dict_data, ensure_ascii=False))return JsonResponse(dict_data)@csrf_exempt
def demo_two(request):print(request.POST)dict_data = {"start": True}return JsonResponse(dict_data)

perform.py

# -*- coding:utf-8 -*-
from django.shortcuts import render,redirect,HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
from demo_one import models
from datetime import datetime
from django import formsclass PerformModelForm(forms.ModelForm):class Meta:model = models.Performexclude = ["times", "name"]def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)for name, field in self.fields.items():field.widget.attrs = {"class": "form-control", "autocomplete": "off"}def perform_list(request):form = PerformModelForm()queryset = models.Perform.objects.all()return render(request, "Ajax-demo/perform_list.html", {"form": form, "queryset":queryset})@csrf_exempt
def perform_add(request):form = PerformModelForm(data=request.POST)if form.is_valid():# 自动保存时间和对应的人员form.instance.name = request.session["info"]["username"]form.instance.times = datetime.now().strftime("%Y-%m-%d %H:%M:%S")# print(request.session["info"]["username"])# print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))form.save()return JsonResponse({"status": True})return JsonResponse({"status": False, "error": form.errors})@csrf_exempt
def perform_delete(request):uid = request.GET.get("uid")exists = models.Perform.objects.filter(id=uid).exists()if not exists:return JsonResponse({"status": False, "error": "数据已被删除"})models.Perform.objects.filter(id=uid).delete()return JsonResponse({"status":True})

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/35675.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

vue2 + dataV 组件问题

在使用 dataV 过程中&#xff0c;遇见 svg 动画不加载问题。 一、理想状态下&#xff1a; 二、开发中遇到的 加载不出来问题。 解决方案 在查找官方资料中&#xff0c;提到使用 key 可以解决方案。 1 绑定 key 2 改变 key 值 注意&#xff1a;一定要在 $nextTick 里面执…

理解论文笔记:基于AHP和模糊综合评价的无线传感器网络可维护性评估方法

作为一个研0的娃,这是我认真读的第一篇论文,想着笔记让自己能看懂。如有侵权,请联系删除。 I. INTRODUCTION 介绍 主要介绍了无线传感器网络可维护性研究的重要性和必要性,并对下面的各章进行了总结。 翻译:第二部分简要介绍了无线传感器网络的维护,并对影响系统的因素…

VS 在多线程中仅调试某个线程

调试多线程程序时&#xff0c;只想观察某个线程的运行情况&#xff1b; 但是&#xff0c;由于线程切换执行&#xff0c;会导致调试时焦点在几个代码块之间跳来跳去&#xff0c;故需要解决这个问题。 参考文章&#xff1a; C#使用线程窗口调试多线程程序。 1 打开线程窗口&…

基于高度的纹理混合shader

基于高度的纹理混合shader 原文&#xff1a;基于高度的纹理混合shader - 知乎 (zhihu.com) 最近支持一个使用unity2021的项目&#xff0c;发现urp自带的Terrain/Lit shader已经自带高度混合了&#xff0c;看了下和我当初写的那个基本差不多&#xff0c;感觉稍微要比我的严谨一…

A股探底回升,跑出惊天大阳,你们知道为什么吗?

今天的A股&#xff0c;探底回升&#xff0c;让人惊呆了&#xff0c;你们知道是为什么吗&#xff1f;盘面上出现3个重要信号&#xff0c;一起来看看&#xff1a; 1、今天A股市场炸锅了&#xff0c;AI人工智能、国产软件、存储芯片迎来了涨停潮&#xff0c;惊呆了&#xff0c;科技…

阿里提出MS-Diffusion:一键合成你喜爱的所有图像元素,个性化生成新思路!

文本到图像生成模型的最新进展极大地增强了从文本提示生成照片级逼真图像的能力&#xff0c;从而增加了人们对个性化文本到图像应用的兴趣&#xff0c;尤其是在多主题场景中。然而&#xff0c;这些进步受到两个主要挑战的阻碍&#xff1a; 需要根据文本描述准确维护每个参考主题…

力扣:59. 螺旋矩阵 II(Java,模拟)

目录 题目描述示例 1&#xff1a;代码实现 题目描述 给你一个正整数 n &#xff0c;生成一个包含 1 到 n2 所有元素&#xff0c;且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。 示例 1&#xff1a; 输入&#xff1a;n 3 输出&#xff1a;[[1,2,3],[8,9,4],[7,6,5…

前端新手小白的第一个AI全栈项目---AI聊天室

前言 ok&#xff0c;大家好。- ̗̀(๑ᵔ⌔ᵔ๑)最近也是想做自己的第一个前后端分离的项目&#xff0c;刚好最近学了一点AI接口的实现。想着用接口做一个自己的ai聊天室并且尝试一下全栈式开发。中间真的解决了很多问题&#xff0c;也是成功之后也是想要将实现过程分享一下&a…

基于CNN卷积神经网络的MQAM调制识别matlab仿真

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 4.1 CNN模型结构 4.2 损失函数与优化 4.3 训练与测试 5.算法完整程序工程 1.算法运行效果图预览 (完整程序运行后无水印) 2.算法运行软件版本 matlab2022a 3.部分核心程序 &#xff0…

d3dx9_42.dll找不到怎么正确处理?教学级修复d3dx9_42.dll的方法分享

d3dx9_42.dll找不到&#xff1f;别着急&#xff0c;这只是普普通通的dll文件找不到而已&#xff0c;它可能因为各种原因而导致丢失&#xff0c;我们只要直接对d3dx9_42.dll进行修复就可以了。下面我们一起来了解一下d3dx9_42.dll找不到的正确处理方法。 一.d3dx9_42.dll找不到是…

深度学习方法在谣言检测中的研究现状

摘要 管理社交媒体上的谣言&#xff0c;减少谣言对社会的危害。许多研究使用深度学习方法来检测开放网络中的谣言。为了从多个角度全面梳理谣言检测的研究现状&#xff0c;本文从特征选择、模型结构和研究方法三个角度分析了这一高度集中的工作。从特征选择的角度&#xff0c;将…

七天速通javaSE:第二天 基础:标识符与数据类型

文章目录 前言一、注释与标识符1. 注释2. 标识符2.1 标识符2.2 关键字 二、数据类型1. 语言类型2. 数据类型2.1 基本数据类型2.2引用数据类型 三、类型转换1. 自动转换2. 强制转换&#xff08;不建议&#xff09; 四、代码规范 前言 今天将学习Java语法的基础&#xff0c;认识…

c语言学习记录(十)———函数

文章目录 前言一、函数的基本用法二、函数的参数传递1.基本方式2 数组在函数中的传参 前言 一个学习C语言的小白~ 有问题评论区或私信指出~ 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、函数的基本用法 函数是一个完成特定功能的代码模块&…

海外代理IP哪个可靠?如何测试代理的稳定性?

在数字化时代&#xff0c;互联网已成为我们日常生活的重要组成部分。然而&#xff0c;随着网络活动的增加&#xff0c;我们面临的安全威胁也随之增加。 黑客攻击、数据泄露、网络钓鱼等安全事件频发&#xff0c;严重威胁着我们的个人隐私和网络安全。代理服务器在当今的互联网世…

深入学习Java1415新特性

一、超实用的Java14新特性 1.Java14新特性概述 2.环境安装 3.超实用新特性

LLM大模型算法学习资源持续整理

文章目录 waytoagiLLM101llm-coursellm-cookbook waytoagi 飞书文档写的AGI知识库。 https://www.waytoagi.com/ LLM101 karpathy更新中的大模型教程&#xff1a; https://github.com/karpathy/LLM101n llm-course Course to get into Large Language Models (LLMs) wi…

node mySql 实现数据的导入导出,以及导入批量插入的sql语句

node 实现导出, 在导出excel中包含图片&#xff08;附件&#xff09; node 实现导出, 在导出excel中包含图片&#xff08;附件&#xff09;-CSDN博客https://blog.csdn.net/snows_l/article/details/139999392?spm1001.2014.3001.5502 一、效果 如图&#xff1a; 二、导入 …

iOS 实现类似抖音滚动效果

效果图 思路 整体上我们使用tableView实现&#xff0c;为了预留内容的缓冲&#xff0c;我们将tableView 的contentinset设置为上面一个屏幕的高度&#xff0c;下面一个屏幕的高度&#xff0c;左右为0&#xff0c;这样保证我们滚动过去的时候 都是准备好的内容 然后就是滑动效果…

25届最近4年中国科学技术大学自动化考研院校分析

中国科学技术大学 目录 一、学校学院专业简介 二、考试科目指定教材 三、近4年考研分数情况 四、近4年招生录取情况 五、最新一年分数段图表 六、历年真题PDF 七、初试大纲复试大纲 八、学费&奖学金&就业方向 一、学校学院专业简介 二、考试科目指定教材 1、…

Java:从嵌入式到云时代的编程语言传奇

Java&#xff0c;自1995年面世以来&#xff0c;已成为全球最受欢迎的编程语言之一。起初&#xff0c;Sun Microsystems公司为了解决嵌入式设备编程的难题&#xff0c;开发了Oak语言&#xff0c;这便是Java的前身。随着互联网的兴起&#xff0c;Oak更名为Java&#xff0c;并迅速…