当前位置: 首页 > news >正文

企业网站建设发展平台/关键词挖掘工具免费

企业网站建设发展平台,关键词挖掘工具免费,建立网站目录结构的意义,wordpress中文版apk目录 模版: 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…

目录

模版:

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})

相关文章:

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…...

代码评审——Java占位符%n的处理

问题描述 在软件开发项目中&#xff0c;特别是在处理动态内容生成与呈现至前端界面的过程中&#xff0c;正确运用占位符以确保文本完整性和数据准确性显得尤为重要。不当的占位符管理不仅可能导致语法错误或逻辑混乱&#xff0c;还会引发一系列隐蔽的问题&#xff0c;这些问题…...

超低排放标准

据朗观视觉小编了解发现&#xff0c;超低排放标准作为衡量一个行业或企业环保水平的重要指标&#xff0c;越来越受到社会各界的关注。本文将深入探讨超低排放标准的内涵、实施意义以及未来展望。 一、超低排放标准的定义 超低排放标准&#xff0c;是指在特定工业生产过程中&am…...

Day15 —— 大语言模型简介

大语言模型简介 大语言模型基本概述什么是大语言模型主要应用领域大语言模型的关键技术大语言模型的应用场景 NLP什么是NLPNLP的主要研究方向word2vecword2vec介绍word2vec的两种模型 全连接神经网络神经网络结构神经网络的激活函数解决神经网络过拟合问题的方法前向传播与反向…...

使用了CDN,局部访问慢,如何排查

如果是局部访问慢&#xff0c;则可从如下角度查看 是否DNS设置错误导致&#xff1f; 个别用户可能存在local DNS设置错误&#xff0c;导致出现跨地域或跨运营商访问。因为CDN的权威DNS是基于用户请求的localDNS来判断所属的地区和运营商&#xff0c;从而将请求引导至对应最近…...

谈谈SQL优化

SQL优化是数据库性能优化中的关键环节&#xff0c;旨在提高查询执行的效率和响应速度。下面是一些常见的SQL优化技巧和策略&#xff0c;涵盖索引、查询设计、表结构设计等方面&#xff1a; 1. 索引优化 创建索引&#xff1a;为常用查询的过滤条件&#xff08;WHERE 子句&…...

力扣随机一题 6/26 哈希表 数组 思维

博客主页&#xff1a;誓则盟约系列专栏&#xff1a;IT竞赛 专栏关注博主&#xff0c;后期持续更新系列文章如果有错误感谢请大家批评指出&#xff0c;及时修改感谢大家点赞&#x1f44d;收藏⭐评论✍ 题目一&#xff1a; 2869.收集元素的最少操作次数【简单】 题目&#xff…...

自动化办公04 使用pyecharts制图

目录 一、柱状图 二、折线图 三、饼图 四、地图 1. 中国地图 2. 世界地图 3. 省会地图 五、词云 Pyecharts是一个用于数据可视化的Python库。它基于Echarts库&#xff0c;可以通过Python代码生成各种类型的图表&#xff0c;如折线图、柱状图、饼图、散点图等。 Pyecha…...

【Elasticsearch】在es中实现mysql中的FIND_IN_SET查询条件

需求场景: 有个文章表里面有个type字段,它存储的是文章类型,有 1头条、2推荐、3热点、4图文等等 。 商品表中有一个type字段,储存的事商品类型例如:1.热销单品,2.品类TOP10,3.销量榜TOP10等等 它的type字段值很有可能是1,2,3,4 在mysql中实现语句 select * from produc…...

内网一键部署k8s-kubeshpere,1.22.12版本

1.引言 本文档旨在指导读者在内网环境中部署 Kubernetes 集群。Kubernetes 是一种用于自动化容器化应用程序部署、扩展和管理的开源平台&#xff0c;其在云原生应用开发和部署中具有广泛的应用。然而&#xff0c;由于一些安全或网络限制&#xff0c;一些组织可能选择在内部网络…...

Python数据分析第一课:Anaconda的安装使用

Python数据分析第一课&#xff1a;Anaconda的安装使用 1.Anaconda是什么&#xff1f; Anaconda是一个便捷的获取包&#xff0c;并且对包和环境进行管理的虚拟环境工具,Anaconda包括了conda、Python在内的超过180多个包和依赖项 简单来说&#xff0c;Anaconda是包管理器和环境…...

数据结构——

1. 什么是并查集&#xff1f; 在计算机科学中&#xff0c;并查集&#xff08;英文&#xff1a;Disjoint-set data structure&#xff0c;直译为不数据结构交集&#xff09;是一种数据结构&#xff0c;用于处理一些不交集&#xff08;Disjoint sets&#xff0c;一系列没有重复元…...

微信小程序建议录音机

在小程序中实现录音机功能&#xff0c;可以通过使用小程序提供的wx.getRecorderManager() API来获取录音管理对象&#xff0c;然后使用这个对象的start()方法来开始录音&#xff0c;使用stop()方法来停止录音&#xff0c;并使用onStop()方法来监听录音的结束。以下是一个简单的…...

双指针:移动零

题目链接&#xff1a;. - 力扣&#xff08;LeetCode&#xff09; 乍一看有点难度&#xff0c;但也是快慢指针的模板。和26. 删除有序数组中的重复项类似&#xff0c;只不过多了一步填充0。 class Solution {public int removeDuplicates(int[] nums) {int fast 1,slow 1;wh…...

图像亮度和对比度的调整

在网上找了很多图像亮度的调整算法&#xff0c;下面是其中一种&#xff0c;可以通过条形框进行调整&#xff0c;并实时的查看对应参数值后的效果。 图像亮度处理公式: y [x - 127.5 * (1 - B)] * k 127.5 * (1 B); x 是输入像素值 y 是输出像素值 B 是亮度值&#xff0c; …...

Linux加固-权限管理_chattr之i和a参数

一、参数i i:如果对文件设置了i属性&#xff0c;不允许对文件进行删除、改名&#xff0c;也不能添加和修改数据&#xff1b;如果对目录设置了i属性&#xff0c;那么只能修改目录下文件的数据&#xff0c;但不允许建立和删除文件。&#xff08;相当于把文件给锁住了&#xff0c;…...

windows10/win11截图快捷键 和 剪贴板历史记录 快捷键

后知后觉的我今天又学了两招&#xff1a; windows10/win11截图快捷键 按 Windows 徽标键‌ Shift S。 选择屏幕截图的区域时&#xff0c;桌面将变暗。 默认情况下&#xff0c;选择“矩形模式”。 可以通过在工具栏中选择以下选项之一来更改截图的形状&#xff1a;“矩形模式”…...

上海计算机考研避雷,25考研慎报

上大计算机一直很热 408考研er重来没有让我失望过&#xff0c;现在上大的专业课是11408&#xff0c;按理说&#xff0c;这个专业课的难度是很高的&#xff0c;但是408er给卷出了新高度&#xff0c;大家可以去上大官网看看今年最新的数据&#xff0c;我也帮大家统计了24年最新的…...

第九次作业

BookInfoMapper.xml <?xml version"1.0" encoding"UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace"com.rabbite…...

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

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

jenkins nginx自动化部署 php项目

在当今快速发展的IT领域&#xff0c;自动化部署已成为提高工作效率和减少错误的关键。Jenkins作为持续集成/持续部署&#xff08;CI/CD&#xff09;的佼佼者&#xff0c;结合Docker容器技术和PHP编程语言&#xff0c;以及Ansible自动化工具&#xff0c;可以实现高效、可靠的自动…...

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

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

MySQL之可扩展性(四)

可扩展性 向外扩展 分片?还是不分片&#xff1f; 这是一个问题&#xff0c;对吧&#xff1f;答案很简单:如非必要&#xff0c;尽量不分片。首先看是否能通过性能调优或者更好的应用或数据库设计来推迟分片。如果能足够长时间地推迟分片&#xff0c;也许可以直接购买更大地服…...

JupyterLab使用指南(三):JupyterLab的Cell详细介绍

JupyterLab Cell 使用教程 JupyterLab 的 cell 是一种强大的工具&#xff0c;提供了编写、执行、展示和记录的全方位支持&#xff0c;使得复杂的计算任务变得简单直观。通过熟练掌握 cell 的各种操作和快捷键&#xff0c;用户可以显著提高工作效率&#xff0c;专注于解决实际问…...

solidity智能合约如何实现跨合约调用函数

背景 比如现在有一个需求、我需要通过外部合约获取BRC20 token的总交易量。那么我需要在brc20的转账函数里面做一些调整&#xff0c;主要是两个函数内统计转移量。然后再提供外部获取函数。 /*** dev Sets amount as the allowance of spender over the callers tokens.** Ret…...

关于Vue2的生命周期会问到哪些面试题?

在Vue2的面试中&#xff0c;关于生命周期的问题通常会涉及以下几个方面&#xff1a; 一、Vue2的生命周期概述 Vue2的生命周期是什么&#xff1f; Vue2的生命周期是指从Vue实例的创建、初始化数据、编译模板、挂载Dom、渲染、更新、卸载等一系列过程。 二、生命周期钩子函数 …...

尚品汇-(七)

&#xff08;1&#xff09;在网关中实现跨域 全局配置类实现 包名&#xff1a;com.atguigu.gmall.gateway.config 创建CorsConfig类 Configuration public class CorsConfig {Beanpublic CorsWebFilter corsWebFilter(){// cors跨域配置对象CorsConfiguration configuration…...

【Python datetime模块精讲】:时间旅行者的日志,精准操控日期与时间

文章目录 前言一、datetime模块简介二、常用类和方法三、date类四、time类五、datetime类六、timedelta类七、常用的函数和属性八、代码及其演示 前言 Python的datetime模块提供了日期和时间的类&#xff0c;用于处理日期和时间的算术运算。这个模块包括date、time、datetime和…...

keepalived 服务高可用(简约版)

本文基于centos 7记述如何使用keepalived 背景 为生产环境准备一台备机是极其必要的&#xff0c;防止主机宕掉无服务可用的情况出现。但是同一局域网内每台主机都分配了一个唯一IP&#xff0c;这些IP既然相互不同&#xff0c;那么服务请求的时候岂不是要切换IP地址&#xff1f…...

【前端】Vue项目和微信小程序生成二维码和条形码

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;我是前端菜鸟的自我修养&#xff01;今天给大家分享Vue项目和微信小程序如何生成二维码和条形码&#xff0c;介绍了JsBarcode、wxbarcode等插件&#xff0c;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01…...