【微信小程序】实现投票功能(附源码)
一、Vant Weapp介绍
- Vant Weapp 是一个基于微信小程序的组件库,它提供了丰富的 UI 组件和交互功能,能够帮助开发者快速构建出现代化的小程序应用。Vant Weapp 的设计理念注重简洁、易用和高效,同时提供灵活的定制化选项,以满足开发者不同的需求。
- Vant Weapp 包含了多个常用的组件,如按钮、导航栏、标签、列表、卡片、表单等,这些组件都经过精心设计和优化,可以帮助开发者快速构建出具有良好交互效果和用户体验的小程序页面。此外,Vant Weapp 还提供了常用的功能组件,例如加载提示、弹出框、下拉刷新、上拉加载等,方便开发者实现各种常用的交互功能。
- Vant Weapp 采用了模块化的设计思路,每个组件都是独立的,不会对页面的其他部分产生影响,这样可以更加灵活地使用和维护组件库。同时,Vant Weapp 还提供了详细的文档和示例代码,方便开发者学习和使用。
- Vant Weapp 是一个功能强大、易用性高的微信小程序组件库,它可以帮助开发者快速构建出现代化、具有良好用户体验的小程序应用。Vant Weapp - 轻量、可靠的小程序 UI 组件库 (youzan.github.io)
https://youzan.github.io/vant-weapp/#/dialog
二、后端
1、实体
编写会议实体和投票实体
会议实体
package com.zking.ssm.model;import java.util.Date;public class Info {private Long id;private String title;private String content;private String canyuze;private String liexize;private String zhuchiren;private String location;private Date starttime;private Date endtime;private String fujian;private Integer state;private String auditperson;private Date audittime;private String seatpic;private String remark;public Info(Long id, String title, String content, String canyuze, String liexize, String zhuchiren, String location, Date starttime, Date endtime, String fujian, Integer state, String auditperson, Date audittime, String seatpic, String remark) {this.id = id;this.title = title;this.content = content;this.canyuze = canyuze;this.liexize = liexize;this.zhuchiren = zhuchiren;this.location = location;this.starttime = starttime;this.endtime = endtime;this.fujian = fujian;this.state = state;this.auditperson = auditperson;this.audittime = audittime;this.seatpic = seatpic;this.remark = remark;}public Info() {super();}public Long getId() {return id;}public void setId(Long id) {this.id = id;}public String getTitle() {return title;}public void setTitle(String title) {this.title = title;}public String getContent() {return content;}public void setContent(String content) {this.content = content;}public String getCanyuze() {return canyuze;}public void setCanyuze(String canyuze) {this.canyuze = canyuze;}public String getLiexize() {return liexize;}public void setLiexize(String liexize) {this.liexize = liexize;}public String getZhuchiren() {return zhuchiren;}public void setZhuchiren(String zhuchiren) {this.zhuchiren = zhuchiren;}public String getLocation() {return location;}public void setLocation(String location) {this.location = location;}public Date getStarttime() {return starttime;}public void setStarttime(Date starttime) {this.starttime = starttime;}public Date getEndtime() {return endtime;}public void setEndtime(Date endtime) {this.endtime = endtime;}public String getFujian() {return fujian;}public void setFujian(String fujian) {this.fujian = fujian;}public Integer getState() {return state;}public void setState(Integer state) {this.state = state;}public String getAuditperson() {return auditperson;}public void setAuditperson(String auditperson) {this.auditperson = auditperson;}public Date getAudittime() {return audittime;}public void setAudittime(Date audittime) {this.audittime = audittime;}public String getSeatpic() {return seatpic;}public void setSeatpic(String seatpic) {this.seatpic = seatpic;}public String getRemark() {return remark;}public void setRemark(String remark) {this.remark = remark;}
}
投票实体
package com.zking.ssm.model;public class Option {private Long id;private Long meetingId;private String optionValue;private String optionText;public Option(Long id, Long meetingId, String optionValue, String optionText) {this.id = id;this.meetingId = meetingId;this.optionValue = optionValue;this.optionText = optionText;}public Option() {super();}public Long getId() {return id;}public void setId(Long id) {this.id = id;}public Long getmeetingId() {return meetingId;}public void setmeetingId(Long meetingId) {this.meetingId = meetingId;}public String getoptionValue() {return optionValue;}public void setoptionValue(String optionValue) {this.optionValue = optionValue;}public String getoptionText() {return optionText;}public void setoptionText(String optionText) {this.optionText = optionText;}
}
2、xmlsql
用来访问数据库的数据进行数据的访问,一个访问会议数据,一个访问投票数据。
<select id="voteList" resultMap="BaseResultMap" >select<include refid="Base_Column_List" />from t_oa_meeting_infowhere 1=1<if test="state!=null">and state=#{state}</if><if test="title!=null">and title like concat('%',#{title},'%')</if></select>
<insert id="insertSelective" parameterType="com.zking.ssm.model.Option" >insert into t_oa_meeting_option<trim prefix="(" suffix=")" suffixOverrides="," ><if test="id != null" >id,</if><if test="meetingId != null" >meetingId,</if><if test="optionValue != null" >optionValue,</if><if test="optionText != null" >optionText</if></trim><trim prefix="values (" suffix=")" suffixOverrides="," ><if test="id != null" >#{id,jdbcType=BIGINT},</if><if test="meetingId != null" >#{meetingId,jdbcType=BIGINT},</if><if test="optionValue != null" >#{optionValue,jdbcType=VARCHAR},</if><if test="optionText != null" >#{optionText,jdbcType=VARCHAR}</if></trim></insert>
3、实现接口
编写方法调用xml里面的sql命令,以便更好的操作数据库里面的数据
编写接口方法
会议
package com.zking.ssm.mapper;import com.zking.ssm.model.Info;import java.util.List;public interface InfoMapper {int deleteByPrimaryKey(Long id);int insert(Info record);int insertSelective(Info record);Info selectByPrimaryKey(Long id);int updateByPrimaryKeySelective(Info record);int updateByPrimaryKey(Info record);List<Info> list(Info info);List<Info> voteList(Info info);
}
投票
package com.zking.ssm.mapper;import com.zking.ssm.model.Option;public interface OptionMapper {int deleteByPrimaryKey(String id);int insert(Option record);int insertSelective(Option record);Option selectByPrimaryKey(String id);int updateByPrimaryKeySelective(Option record);int updateByPrimaryKey(Option record);
}
实现接口
实现会议的接口和投票的接口,需要进行数据的交互。
会议
package com.zking.ssm.service.impl;import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.mapper.WxUserMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.List;/*** @软件包名 com.zking.ssm.service.impl* @用户 tgq* @create 2023-10-24 上午11:24* @注释说明:*/
@Service
public class InfoServiceImpl implements InfoService {@Autowiredprivate InfoMapper infoMapper;@Overridepublic int updateByPrimaryKeySelective(Info record) {return infoMapper.updateByPrimaryKeySelective(record);}@Overridepublic List<Info> voteList(Info info) {return infoMapper.voteList(info);}
}
投票
package com.zking.ssm.service.impl;import com.zking.ssm.mapper.OptionMapper;
import com.zking.ssm.model.Option;
import com.zking.ssm.service.OptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;/*** @软件包名 com.zking.ssm.service.impl* @用户 tgq* @create 2023-10-24 下午9:57* @注释说明:*/
@Service
public class OptionServiceImpl implements OptionService {@Autowiredprivate OptionMapper om;@Overridepublic int insertSelective(Option record) {return om.insertSelective(record);}
}
4、编写Controller
Controller类进行一个前端和后端的一个数据的交互。
会议
package com.zking.ssm.wxcontroller;import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** */
@SuppressWarnings("all")
@RestController
@RequestMapping("/wx/info")
public class WxInfoController {@Autowiredprivate InfoMapper infoMapper;@RequestMapping("/list")public Object list (Info info){List<Info> list = infoMapper.list(info);Map<Object, Object> data = new HashMap<Object, Object>();data.put("infoList",list);return ResponseUtil.ok(data);}@RequestMapping("/votelist")public Object voteList (Info info){List<Info> list = infoMapper.voteList(info);Map<Object, Object> data = new HashMap<Object, Object>();data.put("voteList",list);return ResponseUtil.ok(data);}@RequestMapping("/update")public Object update (Info info){int i = infoMapper.updateByPrimaryKeySelective(info);return ResponseUtil.ok(i);}
}
投票
package com.zking.ssm.wxcontroller;import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.mapper.OptionMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.model.Option;
import com.zking.ssm.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** @Autho donkee* @Since 2022/7/29*/
@SuppressWarnings("all")
@RestController
@RequestMapping("/wx/option")
public class WxOptionController {@Autowiredprivate OptionMapper optionMapper;@RequestMapping("/insert")public Object insertSelective(Option option) {int i = optionMapper.insertSelective(option);return ResponseUtil.ok(i);}}
三、前端
里面有一些技术这里就不多做讲解了,可以查看我的专栏微信小程序_无法自律的人的博客-CSDN博客。
在这里面运用到了一个小程序的插件Dialog 弹出框 - Vant Weapp (youzan.github.io)。在Vant Weapp里面有很多使用的插件,可以更便捷使用起来,主要引用需要自己查看官方文档了。
1、页面布置
编写主页面的页面布置,里面使用了外部插件的一个弹窗组件。
里面利用到了一个wxs的使用。
wxml
<tabs tabList="{{tabs}}" bindtabsItemChange="tabsItemChange"><view class="search-container"><input class="search-input" bindblur="ontitle" bindblur="onBlur" placeholder="会议标题" /><!-- <input class="search-input" bindinput="searchInputTwo" placeholder="投票标题" /> --><button type="primary" plain="true" size="mini" bindtap="likelist">搜索</button></view>
</tabs>
<view><view class="list" data-id=""><view class="list-img al-center"><image class="video-img" mode="scaleToFill" src=""></image></view><view class="list-detail"><view class="list-title"><text><text style="margin-right: 13rpx;"></text></text></view><view class="list-title"><text></text></view><view class="list-tag"><view class="state al-center"></view><view class="join al-center"><text class="list-count"></text></view></view><view class="list-info"><text style="font-weight: bold;"></text><text></text> <text style="float: right;"></text> </view><view><button class="btn"></button></view></view></view><wxs src="/utils/capture.wxs" module="tools" /><block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id"><view class="list" data-id="{{item.id}}"><view class="list-img al-center"><image class="video-img" mode="scaleToFill" src="/static/persons/7.jpg"></image></view><view class="list-detail"><view class="list-title"><text><text style="margin-right: 13rpx;"> 发 起 人</text> : {{item.zhuchiren}}</text></view><view class="list-title"><text>会议名称 : {{item.title}}</text></view><!-- <view class="list-title"><text>投票标题 : [ {{item.vote}} ]</text></view> --><view class="list-tag"><view class="state al-center">{{tools.getState(item.state)}}</view><view class="join al-center"><text class="list-count">{{tools.getNumber(item.canyuze,item.liexize,item.zhuzhiren)}}</text>人参与会议</view></view><view class="list-info"><text style="font-weight: bold;">地址:</text><text>{{item.location}}</text> <text style="float: right;">开始时间:{{tools.formatDate(item.starttime,'YY-MM-DD hh-mm-ss')}}结束时间:{{tools.formatDate(item.endTime,'YY-MM-DD hh-mm-ss')}}</text> </view><view data-id="{{item.id}}" bindtap="{{data.state == 5 ? 'show1' : 'showPopup'}}"><button class="btn">{{data.state == 5? '开启投票' : '参与投票'}}</button><!-- <button wx:if="{{data.state == 5}}" class="btn" bindtap="show1">开启投票</button><button wx:else="{{data.state == 6}}" class="btn" bindtap="showPopup">参与投票</button> --></view></view></view></block><view class="section bottom-line"><text>到底啦</text></view>
</view><!-- 开启投票 弹窗-->
<van-dialog use-slot title="请添加投票选项" show="{{ show1 }}" show-cancel-button bind:close="onClose1" bind:confirm="getVoteState"><view class="container"><view class="input-box"><input placeholder="请输入投票选项" bindblur="onOptionValue" bindinput="bindInput"></input></view><view class="checkbox-group"><view class="checkbox-item" data-id="1" bindtap="toggleCheckbox">同意</view><view class="checkbox-item" data-id="2" bindtap="toggleCheckbox">不同意</view><view class="checkbox-item" data-id="3" bindtap="toggleCheckbox">保留意见</view><view class="checkbox-item" data-id="4" bindtap="toggleCheckbox">弃票</view></view></view>
</van-dialog>
<!-- 选择投票选项 弹窗 -->
<van-dialog use-slot title="选择投票" show="{{ show }}" show-cancel-button bind:close="onClose" bind:confirm="getVoteOption"><view class="container"><view class="input-box"><!-- <input placeholder="请输入投票选项" bindinput="bindInput"></input> --></view><view class="checkbox-group"><view class="checkbox-item {{ checkbox1 ? 'active' : '' }}" data-id="1" bindtap="toggleCheckbox">同意</view><view class="checkbox-item {{ checkbox2 ? 'active' : '' }}" data-id="2" bindtap="toggleCheckbox">不同意</view><view class="checkbox-item {{ checkbox3 ? 'active' : '' }}" data-id="3" bindtap="toggleCheckbox">保留意见</view><view class="checkbox-item {{ checkbox4 ? 'active' : '' }}" data-id="4" bindtap="toggleCheckbox">弃票</view></view></view>
</van-dialog>
2、功能实现
调用到了以上页面的功能、方法的使用,后台数据的交互。
js
// pages/vote/list/list.js ../../config/api.js
const api = require('../../../config/api.js');
const util = require('../../../utils/util.js');
const app = getApp();
Page({/*** 页面的初始数据*/data: {show: false,show1: false,tabs: ['未开启投票', '已开启投票'],lists: [],inputValue: '',//输入框内容data: {id: 0,state: 5,title: ''},option: {meetingId: 0,optionValue: ''},checkbox1: false,checkbox2: false,checkbox3: false,checkbox4: false},onBlur: function (e) {//输入框获取事件this.setData({inputValue: e.detail.value});},onOptionValue: function (e) {//弹窗1输入框获取this.setData({option: { optionValue: e.detail.value }});},likelist() {//搜索事件// console.log(this.data.inputValue);this.data.data.title = this.data.inputValuethis.InfoVote();},tabsItemChange(e) {//是否投票var tolists;if (e.detail.index == 0) {tolists = 5;this.data.data.state = 5// tolists = this.data.lists;} else if (e.detail.index == 1) {// tolists = this.data.lists;tolists = 6;this.data.data.state = 6}this.setData({data: {state: tolists}})console.log(e.detail, this.data.Profile, this.data.data, tolists);this.InfoVote();},InfoVote() {//初始化数据util.request(api.MettingInfoVote, this.data.data).then(res => {// console.log(res)this.setData({lists: res.data.voteList})}).catch(res => {console.log('服器没有开启,使用模拟数据!')})},toggleCheckbox: function (e) {var checkboxId = e.currentTarget.dataset.id;var data = {}; // 更新的状态数据// 遍历每个复选框的状态变量,根据点击的复选框的id确定是否选中Object.keys(this.data).forEach(key => {if (key.includes('checkbox') && key !== `checkbox${checkboxId}` && this.data[key]) {data[key] = false; // 将其他复选框的状态设为false}});// 切换当前复选框的选中状态data[`checkbox${checkboxId}`] = !this.data[`checkbox${checkboxId}`];this.setData(data);},// 1弹窗show1(e) {// console.log(e, e.currentTarget.dataset.id)this.setData({data: {id: e.currentTarget.dataset.id},})this.setData({show1: true})// console.log(e.currentTarget.dataset.id, this.data.data)},getVoteState(e) {//开启投票确认事件console.log(e, this.data.data, this.data.option.meetingId);var optiondata = {meetingId: this.data.data.id,optionValue: this.data.option.optionValue}// console.log(optiondata)util.request(api.MettingOptionInsert, optiondata).then(res => {//添加投票选项// console.log(api.MettingOptionInsert);if (res.errno == 0) {wx.showToast({title: '开启投票成功',icon: 'none',duration: 1500//持续的时间})util.request(api.MettingInfoupdate, { id: optiondata.meetingId, state: 6 }).then(r => {//更改会议状态// console.log(api.MettingInfoupdate);// this.InfoVote('');if (res.errno == 0) {this.data.data.state = 5this.InfoVote('');}}).catch(res => {console.log('服器没有开启,使用模拟数据!')})}}).catch(res => {console.log('服器没有开启,使用模拟数据!')})// console.log(123,i)},onClose1() {this.setData({ show1: false });},// 2弹窗showPopup(e) {this.setData({show: true,data: {id: e.currentTarget.dataset.id}})},getVoteOption(e) {//参与投票确认事件console.log(2, e.detail);},onClose() {this.setData({ show: false });},/*** 生命周期函数--监听页面加载*/onLoad(options) {// this.data.Profile=truethis.InfoVote('');}
})
3、页面美化
美化了页面的布局与美化,还有弹窗的美化,弹窗的布局美化,可以更好的操作。
wxss
/* pages/vote/list/list.wxss */.search-container {display: flex;justify-content: space-between;align-items: center;padding: 10px;background-color: #ffffff;border: cornsilk;
}.search-input {width: 45%;padding: 8px;border-radius: 20px;border: 1px solid rgb(255, 255, 255);font-size: 14px;transition: border-color 0.3s;border: cornsilk;
}.search-input:focus {outline: none;border-color: #51a7f9;
}.search-input::placeholder {color: #999;
}.search-input::-webkit-input-placeholder {color: #999;
}.search-input::-moz-placeholder {color: #999;
}.search-input:-ms-input-placeholder {color: #999;
}
.list {display: flex;flex-direction: row;width: 100%;padding: 0 20rpx 0 0;background-color: seashell;border-bottom: 1px solid #cecece;margin-bottom: 5rpx;height: 350rpx;
}.list-img {display: flex;margin: 10rpx 10rpx;width: 160rpx;height: 250rpx;justify-content: center;align-items: center;flex-direction: column;
}.list-img .video-img {width: 140rpx;height: 160rpx;border-radius: 6px;
}.list-detail {margin: 10rpx 10rpx;display: flex;flex-direction: column;width: 600rpx;height: 300rpx;
}.list-title text {font-size: 9pt;color: #333;font-weight: bold;
}.list-detail {display: flex;height: 100rpx;
}.list-tag {display: flex;
}.state {font-size: 9pt;color: blue;width: 120rpx;height: 40rpx;border: 1px solid blue;border-radius: 2px;margin: 10rpx 0rpx;display: flex;justify-content: center;align-items: center;
}.join {font-size: 11pt;color: #bbb;margin-left: 20rpx;display: flex;justify-content: center;align-items: center;
}.list-count {margin-right: 10rpx;font-size: 11pt;color: red;
}.list-info {font-size: 9pt;color: #bbb;
}.btn {background-color: #3388ff;color: #fff;border-radius: 4rpx;font-size: 16rpx;padding: 10rpx 20rpx;
}.bottom-line {display: flex;height: 60rpx;justify-content: center;align-items: center;background-color: #f3f3f3;
}.bottom-line text {font-size: 9pt;color: #666;
}/* 弹窗 */
.container {display: flex;flex-direction: column;justify-content: center;align-items: center;
}.input-box {margin-top: 20px;
}.checkbox-group {display: flex;flex-direction: column;margin-top: 15px;
}.checkbox-item {width: 100px;height: 40px;background-color: #eaf0f4;margin-bottom: 10px;display: flex;justify-content: center;align-items: center;
}
.container {display: flex;flex-direction: column;justify-content: center;align-items: center;}.input-box {margin-top: 20px;}.checkbox-group {display: flex;flex-direction: column;margin-top: 15px;}.checkbox-item {width: 100px;height: 40px;background-color: #eaf0f4;margin-bottom: 10px;display: flex;justify-content: center;align-items: center;border: 1px solid #ccc;}.checkbox-item.active {background-color: #4285f4;color: white;border-color: #4285f4;}
4、效果演示
演示效果较长,请耐心观看等待.....
相关文章:
【微信小程序】实现投票功能(附源码)
一、Vant Weapp介绍 Vant Weapp 是一个基于微信小程序的组件库,它提供了丰富的 UI 组件和交互功能,能够帮助开发者快速构建出现代化的小程序应用。Vant Weapp 的设计理念注重简洁、易用和高效,同时提供灵活的定制化选项,以满足开发…...
Pytorch入门实例的分解写法
数据集是受教育年限和收入,如下图 代码如下 import torch import numpy as np import matplotlib.pyplot as plt import pandas as pddata pd.read_csv(./Income.csv)X torch.from_numpy(data.Education.values.reshape(-1,1).astype(np.float32)) Y torch.from_numpy(data…...
Google单元测试sample分析(一)
本文开始从googletest提供的sample案例分析如何使用单元测试, 代码路径在googletest/googletest/samples/sample1.unittest.cc 本文件主要介绍EXPECT*相关宏使用 EXPECT_EQ 判断是否相等 EXPECT_TRUE 是否为True EXPECT_FALSE 是否为False TEST(FactorialTest, N…...
requests 实践
Requests 常用参数 method: 请求方式 get,或者 post,put,delete 等 url : 请求的 url 地址 接口文档标注的接口请求地址 params:请求数据中的链接,常见的一个 get 请求,请求参数都是在 url 地址…...
UI设计公司成长日记2:修身及持之以恒不断学习是要务
作者:蓝蓝设计 要做一个好的UI设计公司,不仅要在能力上设计能力一直(十几年几十年)保持优秀稳定的保持输出,以及心态的平和宽广。创始人对做公司要有信心,合伙人之间要同甘共苦,遵守规则,做好表…...
辅助驾驶功能开发-功能规范篇(23)-2-Mobileye NOP功能规范
5.2 状态机要求 5.2.1 NOP/HWP 状态机 NOP/HWP状态机如下所示: 下表总结了这些状态: 状态描述Passive不满足功能条件,功能无法控制车辆执行器。Standby满足功能条件。该功能不是由驾驶员激活的。功能不控制车辆执行器。Active - Main功能由驾驶员激活。功能是控制…...
React中如何提高组件的渲染效率
一、是什么 react 基于虚拟 DOM 和高效 Diff算法的完美配合,实现了对 DOM最小粒度的更新,大多数情况下,React对 DOM的渲染效率足以我们的业务日常 复杂业务场景下,性能问题依然会困扰我们。此时需要采取一些措施来提升运行性能&…...
springboot+mybatis3.5.2动态查询某一字段在某一段时间内的统计信息(折线图)
需求: 动态查询某一统计字段在一段时间内的统计折线图信息 controller层 ApiOperation(value "getStatisticDetail", notes "统计折线图")GetMapping("/detail")ResponseStatus(HttpStatus.OK)AccessLogAnnotation(ignoreRequestA…...
关于本地项目上传到gitee的详细流程
如何上传本地项目到Gitee的流程: 1.Gitee创建项目 2. 进入所在文件夹,右键点击Git Bash Here 3.配置用户名和邮箱 在gitee的官网找到命令,注意这里的用户名和邮箱一定要和你本地的Git相匹配,否则会出现问题。 解决方法如下&…...
MarkDown详细入门笔记
本帖整理了MarkDown的入门学习笔记~ 一.介绍 Markdown 是一种轻量级的「标记语言」,它的优点很多,目前也被越来越多的写作爱好者,撰稿者广泛使用。 诸如微信公众平台、CSDN博客、还有Typora中写文档的部分,均涉及到MD的功能~ 它…...
算法——贪心算法
贪心算法(Greedy Algorithm)是一种算法设计策略,通常用于解决组合优化问题,其核心思想是在每一步都选择当前状态下最优的解,而不考虑之后的步骤。贪心算法在每一步都做出局部最优选择,期望通过一系列局部最…...
102.linux5.15.198 编译 firefly-rk3399(1)
1. 平台: rk3399 firefly 2g16g 2. 内核:linux5.15.136 (从内核镜像网站下载) 3. 交叉编译工具 gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 4. 宿主机:ubuntu18.04 5. 需要的素材和资料ÿ…...
易点易动固定资产管理系统:多种盘点方式助力年终固定资产盘点
年末固定资产盘点是企业管理中一项重要而繁琐的任务。为了帮助企业高效完成年终固定资产盘点工作,易点易动固定资产管理系统提供了多种盘点方式。本文将详细介绍易点易动固定资产管理系统的多种盘点方式,展示如何借助该系统轻松完成年终固定资产盘点&…...
C# Winform编程(10)Chart图表控件
Chart控件 Chart控件Chart属性详述Chart属性设置图表样式属性数据样式属性图例样式图标区样式SeriesChartType类型 Chart控件鼠标滚轮事件特殊处理Series绑定数据演示代码鼠标滚轮缩放图表示例参考引用 Chart控件 Chart控件是微软自带的一种图形可视化组件,使用简单…...
群狼调研(长沙产品概念测试)|如何做新品上市满意度调研
新品上市满意度调研是一种重要的市场研究方法,它通过收集和分析消费者对新产品的态度、购买意愿和满意度等方面的数据,帮助企业了解消费者的需求和期望,发现新产品的问题和不足,从而为产品改进提供有力的数据支持。群狼调研&#…...
Lua与C++交互
文章目录 1、Lua和C交互2、基础练习2.1、加载Lua脚本并传递参数2.2、加载脚本到stable(包)2.3、Lua调用c语言接口2.4、Lua实现面向对象2.5、向脚本中注册c的类 1、Lua和C交互 1、lua和c交互机制是基于一个虚拟栈,C和lua之间的所有数据交互都通…...
Ubuntu安装pyenv,配置虚拟环境
文章目录 安装pyenvpyenv创建虚拟环境一般情况下创建虚拟环境的方法 安装pyenv 摘自:文章 pyenv可以管理不同的python版本 1、安装pyenv的依赖库 # 执行以下命令安装依赖库 # 更新源 sudo apt-get update # 更新软件 sudo apt-get upgradesudo apt-get install ma…...
【分布式技术专题】「分布式技术架构」MySQL数据同步到Elasticsearch之N种方案解析,实现高效数据同步
MySQL数据同步到Elasticsearch之N种方案解析,实现高效数据同步 前提介绍MySQL和ElasticSearch的同步双写优点缺点针对于缺点补充优化方案 MySQL和ElasticSearch的异步双写优点缺点 定时延时写入ElasticSearch数据库机制优点缺点 开源和成熟的数据迁移工具选型Logsta…...
什么是React中的高阶组件(Higher Order Component,HOC)?它的作用是什么?
聚沙成塔每天进步一点点 ⭐ 专栏简介 前端入门之旅:探索Web开发的奇妙世界 欢迎来到前端入门之旅!感兴趣的可以订阅本专栏哦!这个专栏是为那些对Web开发感兴趣、刚刚踏入前端领域的朋友们量身打造的。无论你是完全的新手还是有一些基础的开发…...
NEFU离散数学实验3-递推方程
相关概念 递推方程是指一种递归定义,它将问题拆分成更小的子问题,并使用这些子问题的解来计算原问题的解。离散数学中,递推方程通常用于描述数列、组合问题等。 以下是一些递推方程相关的概念和公式: 1. 递推公式:递推…...
基于Docker Compose部署Java微服务项目
一. 创建根项目 根项目(父项目)主要用于依赖管理 一些需要注意的点: 打包方式需要为 pom<modules>里需要注册子模块不要引入maven的打包插件,否则打包时会出问题 <?xml version"1.0" encoding"UTF-8…...
现代密码学 | 椭圆曲线密码学—附py代码
Elliptic Curve Cryptography 椭圆曲线密码学(ECC)是一种基于有限域上椭圆曲线数学特性的公钥加密技术。其核心原理涉及椭圆曲线的代数性质、离散对数问题以及有限域上的运算。 椭圆曲线密码学是多种数字签名算法的基础,例如椭圆曲线数字签…...
GitHub 趋势日报 (2025年06月08日)
📊 由 TrendForge 系统生成 | 🌐 https://trendforge.devlive.org/ 🌐 本日报中的项目描述已自动翻译为中文 📈 今日获星趋势图 今日获星趋势图 884 cognee 566 dify 414 HumanSystemOptimization 414 omni-tools 321 note-gen …...
IT供电系统绝缘监测及故障定位解决方案
随着新能源的快速发展,光伏电站、储能系统及充电设备已广泛应用于现代能源网络。在光伏领域,IT供电系统凭借其持续供电性好、安全性高等优势成为光伏首选,但在长期运行中,例如老化、潮湿、隐裂、机械损伤等问题会影响光伏板绝缘层…...
Android 之 kotlin 语言学习笔记三(Kotlin-Java 互操作)
参考官方文档:https://developer.android.google.cn/kotlin/interop?hlzh-cn 一、Java(供 Kotlin 使用) 1、不得使用硬关键字 不要使用 Kotlin 的任何硬关键字作为方法的名称 或字段。允许使用 Kotlin 的软关键字、修饰符关键字和特殊标识…...
【开发技术】.Net使用FFmpeg视频特定帧上绘制内容
目录 一、目的 二、解决方案 2.1 什么是FFmpeg 2.2 FFmpeg主要功能 2.3 使用Xabe.FFmpeg调用FFmpeg功能 2.4 使用 FFmpeg 的 drawbox 滤镜来绘制 ROI 三、总结 一、目的 当前市场上有很多目标检测智能识别的相关算法,当前调用一个医疗行业的AI识别算法后返回…...
Linux --进程控制
本文从以下五个方面来初步认识进程控制: 目录 进程创建 进程终止 进程等待 进程替换 模拟实现一个微型shell 进程创建 在Linux系统中我们可以在一个进程使用系统调用fork()来创建子进程,创建出来的进程就是子进程,原来的进程为父进程。…...
AI病理诊断七剑下天山,医疗未来触手可及
一、病理诊断困局:刀尖上的医学艺术 1.1 金标准背后的隐痛 病理诊断被誉为"诊断的诊断",医生需通过显微镜观察组织切片,在细胞迷宫中捕捉癌变信号。某省病理质控报告显示,基层医院误诊率达12%-15%,专家会诊…...
rknn toolkit2搭建和推理
安装Miniconda Miniconda - Anaconda Miniconda 选择一个 新的 版本 ,不用和RKNN的python版本保持一致 使用 ./xxx.sh进行安装 下面配置一下载源 # 清华大学源(最常用) conda config --add channels https://mirrors.tuna.tsinghua.edu.cn…...
pgsql:还原数据库后出现重复序列导致“more than one owned sequence found“报错问题的解决
问题: pgsql数据库通过备份数据库文件进行还原时,如果表中有自增序列,还原后可能会出现重复的序列,此时若向表中插入新行时会出现“more than one owned sequence found”的报错提示。 点击菜单“其它”-》“序列”,…...
