仿iOS日历、飞书日历、Google日历的日模式

仿iOS日历、飞书日历、Google日历的日模式,24H内事件可自由上下拖动、自由拉伸。

以下是效果图:

具体实现比较简单,代码如下:

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ScrollView;import androidx.annotation.Nullable;import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;//4、Java to c#
public class MultiRectView extends View {private Paint paintRect;private Paint borderPaint ;private Paint paintLine;private Paint paintDragText;private List<RectF> rectangles;private List<Map> rectanglesMapList;private RectF currentRect; // 当前操作的矩形private RectF preRect; // 操作的前一个矩形private int currentRectIndex = 0;// 当前被选中的矩形private float rectWidth = 200f; // 矩形宽度private float rectHeight = 100f; // 矩形高度private int currentHandle; // 记录当前操作的控制点private float lastX, lastY; // 手指最后位置private float preX, preY; // 手指起始位置private TextPaint textPaint;private Paint shadowPaint; // 用于阴影效果// 控制点private static final int NONE = -1;private static final int LEFT_TOP = 0;private static final int RIGHT_TOP = 1;private static final int LEFT_BOTTOM = 2;private static final int RIGHT_BOTTOM = 3;private static final int MOVE_RECT = 4;// 刻度设置private final int SCALE_INTERVAL = 30; // 30分钟private final int TOTAL_SCALES = 24 * 4; // 24小时,每小时4个15分钟刻度// 设置最小高度private final int MIN_RECT_HEIGHT = 100;long lineWidth = 6;long lineLen = 30;private String[] hours;private GestureDetector gestureDetector;private Context mContext;private onclickListener onclickListener;private onLongclicklistener onLongclickListener;private long longPressStartTime = 0;//长按时间private boolean isDragging = false;private ScrollView scrollView;private int mScaleWidth = 30;//上下间距private int mScaleLineX = 140;//横线距离左侧的起始距离点private int mScaleLineText = 30;//刻度的起始点private int mScaleRectToLeft = 150;//矩形距离左侧间距private List<String> texts; // 存储每个矩形内的文本private Canvas mCanvas;private String topText = "";private String bottomText = "";int topScale = 0;int bottomScale = 0;private RectF rectMove;private boolean isCancleClickStatus = true;private boolean isLongPressStatus = false;//长按状态//计时器,计时点击时长Timer timer;TimerTask timerTask;private final int LONGPRESSTIME = 500;//长按超过0.5秒,触发长按事件private float cornerRadius = 15f; // 圆角半径private List<ActiviesDataModel> activiesDataModelListl;private float offsetAmount = 20; // 偏移量,具体根据需求调整public MultiRectView(Context context) {super(context);mContext = context;init();}public MultiRectView(Context context, @Nullable AttributeSet attrs) {super(context, attrs);mContext = context;init();}public MultiRectView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);mContext = context;init();}@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {super.onMeasure(widthMeasureSpec, heightMeasureSpec);int heightSize = MeasureSpec.getSize(heightMeasureSpec);int reHeight = resolveSize(heightSize, heightMeasureSpec);setMeasuredDimension(widthMeasureSpec, reHeight);}public void setScrollView(ScrollView scrollView1) {this.scrollView = scrollView1;}private void init() {texts = new ArrayList<>();rectangles = new ArrayList<>();rectanglesMapList = new ArrayList<>();// 初始化填充画笔paintRect = new Paint();paintRect.setAntiAlias(true);paintRect.setStyle(Paint.Style.FILL);paintRect.setColor(getResources().getColor(R.color.purple_200));paintRect.setStrokeCap(Paint.Cap.ROUND);paintRect.setStrokeWidth(3);//控制矩形宽高// 初始化边框画笔borderPaint = new Paint();borderPaint.setAntiAlias(true);borderPaint.setStyle(Paint.Style.STROKE);borderPaint.setColor(getResources().getColor(R.color.purple_300)); // 设置边框颜色为黄色borderPaint.setStrokeWidth(3); // 设置边框宽度//划线属性paintLine = new Paint();paintLine.setColor(Color.RED);//动态显示时间标签的画笔属性paintDragText = new Paint();paintDragText.setColor(Color.GREEN);paintDragText.setTextSize(30);//左侧时间的画笔属性textPaint = new TextPaint();textPaint.setColor(Color.BLACK);textPaint.setTextSize(32); // 设置文本大小//阴影shadowPaint = new Paint();shadowPaint.setAntiAlias(true);shadowPaint.setStyle(Paint.Style.FILL); // 设为填充样式shadowPaint.setColor(getResources().getColor(R.color.purple_300)); // 阴影主体的颜色shadowPaint.setShadowLayer(10f, 0f, 0f, getResources().getColor(R.color.black2)); // 设置阴影外圈渐变效果}@Overrideprotected void onDraw(Canvas canvas) {super.onDraw(canvas);drawScale(canvas); // 绘制刻度线、时间刻度for (int i = 0; i < rectangles.size(); i++) {if(i != currentRectIndex){// 绘制未选中的矩形RectF rect = rectangles.get(i);// 检查重叠并调整位置
//                if (isOverlapping(rect, i)) {
//                    rect.left -= offsetAmount; // 向左偏移
//                }drawRectAndText(canvas, rect, i);//画矩形框、内部写字drawCurrentScale(canvas, rect, i);//绘制显示实时刻度}}// 绘制当前选中的矩形,确保其在最上层if (currentRectIndex != -1) {RectF selectedRect = rectangles.get(currentRectIndex);drawRectAndText(canvas, selectedRect, currentRectIndex,true); // 画选中的矩形框、内部写字drawCurrentScale(canvas, selectedRect,currentRectIndex); // 绘制选中的矩形显示实时刻度}this.mCanvas = canvas;}private boolean isOverlapping(RectF currentRect, int currentIndex) {for (int i = 0; i < rectangles.size(); i++) {if (i != currentIndex) {RectF otherRect = rectangles.get(i);if (RectF.intersects(currentRect, otherRect)) {return true; // 矩形重叠}}}return false; // 矩形不重叠}private void drawScale(Canvas canvas) {// 绘制15分钟刻度线for (int n = 0; n <= TOTAL_SCALES; n++) {float y = n * mScaleWidth; // 计算刻度Y坐标// 计算并绘制时间标签(15分钟为单位)if (n % 4 == 0) { // 但每小时显示并绘制一次int hour = n / 4;if ((n / 4 + "").contains("24")) {hour = 0;}if (y == 0) {//第一根线防止画不全y = 15;}String timeText = String.format("%02d:00", hour);canvas.drawText(timeText, mScaleLineX - 100, y + 10, textPaint); // 绘制时间文本canvas.drawLine(mScaleLineX, y, getWidth() - 30, y + 20, paintLine); // 绘制刻度线}}}private String finalStartTime = "";private String finalEndTime = "";private void drawCurrentScale(Canvas canvas, RectF rect, int index) {//绘制显示实时的刻度// 计算矩形边界的时间刻度值topScale = (int) Math.round(rect.top / (mScaleWidth)); // 计算矩形上边界的刻度bottomScale = Math.round(rect.bottom / (mScaleWidth)); // 计算矩形下边界的刻度if (currentRect != rect) {//只有当前点击的矩形参与显示return;}boolean isLongPressStatus = (activiesDataModelListl.get(index)).isLongPressStatus();if (isLongPressStatus) {finalStartTime = "";finalEndTime = "";// 确保边界值在可用范围内if (topScale >= 0 && topScale < TOTAL_SCALES) {rectMove = rect;topText = String.format("%02d:%02d", topScale / 4, (topScale % 4) * 15);finalStartTime = topText;//  canvas.drawText(topText, mScaleLineX + 10, rect.top + 20, textPaint); // 绘制上边界刻度canvas.drawText(topText, mScaleLineX - 100, rect.top + 20, paintDragText); // 绘制上边界刻度}if (bottomScale >= 0 && bottomScale < TOTAL_SCALES) {bottomText = String.format(" %02d:%02d", bottomScale / 4, (bottomScale % 4) * 15);finalEndTime = bottomText;canvas.drawText(bottomText, mScaleLineX - 100, rect.bottom - 10, paintDragText); // 绘制下边界刻度//canvas.drawText(bottomText, mScaleLineX + 10, rect.bottom - 10, textPaint); // 绘制下边界刻度}if (!TextUtils.isEmpty(finalStartTime) && !TextUtils.isEmpty(finalEndTime)) {//更新调整后的时间activiesDataModelListl.get(index).setStart_time(finalStartTime);activiesDataModelListl.get(index).setEnd_time(finalEndTime);}} else {}}private void drawRectAndText(Canvas canvas, RectF rect, int index) {canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paintRect); // 绘制圆角矩形-填充canvas.drawRoundRect(rect, cornerRadius, cornerRadius, borderPaint); // 绘制圆角矩形-边框boolean isLongPressStatus = (activiesDataModelListl.get(index)).isLongPressStatus();//绘制矩形的四个边角if (isLongPressStatus) {if (currentRect != null && currentRect == rect) {// lt h 左上角//  canvas.drawLine(rect.left, rect.top, rect.left + lineLen, rect.top, paintRect);// lt v//    canvas.drawLine(rect.left, rect.top, rect.left, rect.top + lineLen, paintRect);// rt h 右上角//  canvas.drawLine(rect.right - lineLen, rect.top, rect.right, rect.top, paintRect);// rt v//   canvas.drawLine(rect.right, rect.top, rect.right, rect.top + lineLen, paintRect);// lb h左下角//   canvas.drawLine(rect.left, rect.bottom, rect.left + lineLen, rect.bottom, paintRect);// lb v//       canvas.drawLine(rect.left, rect.bottom - lineLen, rect.left, rect.bottom, paintRect);// rb h 右下角//   canvas.drawLine(rect.right - lineLen, rect.bottom, rect.right, rect.bottom, paintRect);// rb v//  canvas.drawLine(rect.right, rect.bottom - lineLen, rect.right, rect.bottom, paintRect);drawShadowEffect(canvas, rect); // 绘制阴影效果}}ActiviesDataModel activiesDataModel = activiesDataModelListl.get(index);String name = activiesDataModel.getPop_name();String address = activiesDataModel.getPop_address();int popdb_id = activiesDataModel.getPopdb_id();String startTime = activiesDataModel.getStart_time();String endTime = activiesDataModel.getEnd_time();String value = name + " \n " + address + " \n " + startTime + " -- " + endTime;// 绘制矩形内的文本StaticLayout staticLayout = new StaticLayout(value, textPaint,(int) rect.width(), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);canvas.save();canvas.translate(rect.left, rect.top); // 移动画布到矩形的左上角staticLayout.draw(canvas);canvas.restore();}private void drawRectAndText(Canvas canvas, RectF rect, int index,boolean isInUp) {canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paintRect); // 绘制圆角矩形-填充canvas.drawRoundRect(rect, cornerRadius, cornerRadius, borderPaint); // 绘制圆角矩形-边框boolean isLongPressStatus = (activiesDataModelListl.get(index)).isLongPressStatus();//绘制矩形的四个边角if (isLongPressStatus) {if (currentRect != null && currentRect == rect) {// lt h 左上角//  canvas.drawLine(rect.left, rect.top, rect.left + lineLen, rect.top, paintRect);// lt v//    canvas.drawLine(rect.left, rect.top, rect.left, rect.top + lineLen, paintRect);// rt h 右上角//  canvas.drawLine(rect.right - lineLen, rect.top, rect.right, rect.top, paintRect);// rt v//   canvas.drawLine(rect.right, rect.top, rect.right, rect.top + lineLen, paintRect);// lb h左下角//   canvas.drawLine(rect.left, rect.bottom, rect.left + lineLen, rect.bottom, paintRect);// lb v//       canvas.drawLine(rect.left, rect.bottom - lineLen, rect.left, rect.bottom, paintRect);// rb h 右下角//   canvas.drawLine(rect.right - lineLen, rect.bottom, rect.right, rect.bottom, paintRect);// rb v//  canvas.drawLine(rect.right, rect.bottom - lineLen, rect.right, rect.bottom, paintRect);drawShadowEffect(canvas, rect); // 绘制阴影效果}}ActiviesDataModel activiesDataModel = activiesDataModelListl.get(index);String name = activiesDataModel.getPop_name();String address = activiesDataModel.getPop_address();int popdb_id = activiesDataModel.getPopdb_id();String startTime = activiesDataModel.getStart_time();String endTime = activiesDataModel.getEnd_time();String value = name + " \n " + address + " \n " + startTime + " -- " + endTime;// 绘制矩形内的文本StaticLayout staticLayout = new StaticLayout(value, textPaint,(int) rect.width(), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);canvas.save();canvas.translate(rect.left, rect.top); // 移动画布到矩形的左上角staticLayout.draw(canvas);canvas.restore();}private void drawShadowEffect(Canvas canvas, RectF rect) {// 绘制阴影canvas.drawRoundRect(rect, cornerRadius, cornerRadius, shadowPaint); // 绘制圆角矩形}@Overridepublic boolean onTouchEvent(MotionEvent event) {float currentX = event.getX();float currentY = event.getY();switch (event.getAction()) {case MotionEvent.ACTION_DOWN:// 检查是否按下了控制点longPressStartTime = 0;for (int i = 0; i < rectangles.size(); i++) {RectF rect = rectangles.get(i);if (isInHandle(currentX, currentY, rect, LEFT_TOP)) {currentRect = rect;currentHandle = LEFT_TOP;} else if (isInHandle(currentX, currentY, rect, RIGHT_TOP)) {currentRect = rect;currentHandle = RIGHT_TOP;} else if (isInHandle(currentX, currentY, rect, LEFT_BOTTOM)) {currentRect = rect;currentHandle = LEFT_BOTTOM;} else if (isInHandle(currentX, currentY, rect, RIGHT_BOTTOM)) {currentRect = rect;currentHandle = RIGHT_BOTTOM;} else if (rect.contains(currentX, currentY)) {// 检测是否按下矩形currentRectIndex = i;longPressStartTime = System.currentTimeMillis(); // 记录长按开始时间currentRect = rect;currentHandle = MOVE_RECT;if (preRect != currentRect) {//前后两个矩形不是同一个//  isLongPressStatus = false;}timer = new Timer();timerTask = new TimerTask() {@Overridepublic void run() {//长按逻辑触发if(currentRectIndex!=-1){activiesDataModelListl.get(currentRectIndex).setLongPressStatus(true);// 长按触摸区域,禁止父容器 (ScrollView) 拦截触摸事件if (scrollView != null) {scrollView.requestDisallowInterceptTouchEvent(true);}}invalidate(); // 刷新视图}};timer.schedule(timerTask, LONGPRESSTIME, 1000 * 60 * 60 * 24);} else {// activiesDataModelListl.get(i).setLongPressStatus(false);}}lastX = currentX;lastY = currentY;preX = currentX;preY = currentY;isCancleClickStatus = true;try {boolean longPressStatus = activiesDataModelListl.get(currentRectIndex).isLongPressStatus();if (currentRect != null && longPressStatus) {// 触摸区域在矩形内,禁止父容器 (ScrollView) 拦截触摸事件if (scrollView != null) {scrollView.requestDisallowInterceptTouchEvent(true);}}} catch (Exception e) {e.getMessage();}break;case MotionEvent.ACTION_MOVE:if (currentRect != null) {float dx = currentX - lastX;float dy = currentY - lastY;boolean isLongPressStatus = false;if(currentRectIndex!=-1){isLongPressStatus = (activiesDataModelListl.get(currentRectIndex)).isLongPressStatus();}switch (currentHandle) {case LEFT_TOP://  currentRect.left += dx;//只允许上下拉伸 禁止左右拉伸if (isLongPressStatus) {currentRect.top += dy;}break;case RIGHT_TOP://   currentRect.right += dx;if (isLongPressStatus) {currentRect.top += dy;}break;case LEFT_BOTTOM://  currentRect.left += dx;if (isLongPressStatus) {currentRect.bottom += dy;}break;case RIGHT_BOTTOM://    currentRect.right += dx;if (isLongPressStatus) {currentRect.bottom += dy;}break;case MOVE_RECT:if (currentRectIndex != -1) {long pressDuration = System.currentTimeMillis() - longPressStartTime;if (isLongPressStatus) {//长按的时间长度//     isDragging = true; // 开始拖动// 计算拖动距离RectF rect = rectangles.get(currentRectIndex);rect.offset(0, (int) dy);//dx=0 只允许Y轴滑动 不允许x轴左右滑动}}break;}for (int n = 0; n < rectangles.size(); n++) {RectF rect = rectangles.get(n);boolean isLongPressStatusTemp = (activiesDataModelListl.get(n)).isLongPressStatus();if (rect != currentRect) {activiesDataModelListl.get(n).setLongPressStatus(false);}}//取消计时timerTask.cancel();timer.cancel();// 更新最后位置lastX = currentX;lastY = currentY;invalidate(); // 刷新视图}break;case MotionEvent.ACTION_UP:if (currentRect != null) {float dx = currentX - preX;float dy = currentY - preY;boolean isLongPressStatus = false;if(currentRectIndex!=-1){isLongPressStatus = (activiesDataModelListl.get(currentRectIndex)).isLongPressStatus();}if (dx == 0 && dy == 00) {//此处应该用绝对值来判断一个较小的数值if (!isLongPressStatus) {//不是长按状态的矩形boolean isHasTrue = false;for (int n = 0; n < rectangles.size(); n++) {RectF rect = rectangles.get(n);boolean isLongPressStatusTemp = (activiesDataModelListl.get(n)).isLongPressStatus();if (isLongPressStatusTemp) {isHasTrue = true;//检查是否存在点击状态的矩形}if (rect != currentRect) {activiesDataModelListl.get(n).setLongPressStatus(false);}}invalidate(); // 刷新视图if (isHasTrue) {} else {//如果没有选中状态矩形 则允许回调点击事件if (onclickListener != null) {onclickListener.onclick(currentRectIndex + "--" + activiesDataModelListl.get(currentRectIndex).getPop_name());}}} else {//点击的是长按状态的矩形}}preRect = currentRect;} else {//点击在非矩形区域isCancleClickStatus = false;//   isLongPressStatus = false;try {(activiesDataModelListl.get(currentRectIndex)).setLongPressStatus(false);} catch (Exception e) {e.getMessage();}invalidate(); // 刷新视图}// currentRectIndex = -1; // 取消触摸currentRect = null;currentHandle = NONE;//取消计时timerTask.cancel();timer.cancel();try {boolean longPressStatusUp = activiesDataModelListl.get(currentRectIndex).isLongPressStatus();// 恢复父容器 (ScrollView) 拦截触摸事件if (scrollView != null && !longPressStatusUp) {scrollView.requestDisallowInterceptTouchEvent(false);}} catch (Exception e) {e.getMessage();}break;case MotionEvent.ACTION_CANCEL:currentHandle = NONE;currentRectIndex = -1; // 取消触摸isLongPressStatus = false;//  (activiesDataModelListl.get(currentRectIndex)).setLongPressStatus(false);// 恢复父容器 (ScrollView) 拦截触摸事件if (scrollView != null) {scrollView.requestDisallowInterceptTouchEvent(false);}break;}return true;}private boolean isInHandle(float x, float y, RectF rect, int handle) {float handleSize = 60f; // 控制点的尺寸switch (handle) {case LEFT_TOP:return x >= rect.left - handleSize / 2 && x <= rect.left + handleSize / 2 &&y >= rect.top - handleSize / 2 && y <= rect.top + handleSize / 2;case RIGHT_TOP:return x >= rect.right - handleSize / 2 && x <= rect.right + handleSize / 2 &&y >= rect.top - handleSize / 2 && y <= rect.top + handleSize / 2;case LEFT_BOTTOM:return x >= rect.left - handleSize / 2 && x <= rect.left + handleSize / 2 &&y >= rect.bottom - handleSize / 2 && y <= rect.bottom + handleSize / 2;case RIGHT_BOTTOM:return x >= rect.right - handleSize / 2 && x <= rect.right + handleSize / 2 &&y >= rect.bottom - handleSize / 2 && y <= rect.bottom + handleSize / 2;default:return false;}}public void addRectangle(float left, float top, int tags, String textC) {//rectWidth = getWidth()-400;RectF rect = new RectF(left, top, 1010, top + rectHeight);Map<Integer, RectF> map = new HashMap<Integer, RectF>();map.put(tags, rect);texts.add(textC);rectanglesMapList.add(map);rectangles.add(rect);invalidate(); // 刷新视图}public void addRectangle(ArrayList<ActiviesDataModel> list) {this.activiesDataModelListl = list;for (int i = 0; i < activiesDataModelListl.size(); i++) {ActiviesDataModel activiesDataModel = activiesDataModelListl.get(i);String name = activiesDataModel.getPop_name();String address = activiesDataModel.getPop_address();int popdb_id = activiesDataModel.getPopdb_id();String startTime = activiesDataModel.getStart_time();String endTime = activiesDataModel.getEnd_time();// 需要根据具体的业务逻辑计算 left 和 topfloat top_start = formatTimeToYValues(startTime);float bootom_end = formatTimeToYValues(endTime);float rect_height = bootom_end - top_start;float rect_width = this.getWidth() - mScaleRectToLeft;RectF rect = new RectF(mScaleRectToLeft, top_start, 1010, top_start + rect_height);Map<Integer, RectF> map = new HashMap<>();map.put(i, rect);texts.add(name + " \n " + address + " \n " + startTime + " \n " + endTime);rectanglesMapList.add(map);rectangles.add(rect);}invalidate(); // 刷新视图}// 转换刻度值为时间字符串private float formatTimeToYValues(String time_value) {float y_value = 0;String closesTime = findClosestTimeRange(time_value);// 绘制15分钟刻度线for (int n = 0; n <= TOTAL_SCALES; n++) {float y = n * mScaleWidth; // 计算刻度Y坐标int hour = n / 4;int minute = (n % 4) * 15; // 每个刻度15分钟if ((n / 4 + "").contains("24")) {hour = 0;}String timeHMText = String.format("%02d:%02d", hour, minute);if (closesTime.equals(timeHMText)) {y_value = y;break;}}return y_value;}public String findClosestTimeRange(String time) {String[] parts = time.split(":");int hour = Integer.parseInt(parts[0]);int minute = Integer.parseInt(parts[1]);int totalMinutes = hour * 60 + minute;// 找到最接近的15分钟的倍数int closestMultiple = Math.round((float) totalMinutes / 15) * 15;// 将最接近的总分钟数转换回HH:MM格式int closestHour = closestMultiple / 60;int closestMinute = closestMultiple % 60;return String.format("%02d:%02d", closestHour, closestMinute);}public void setonclicklistener(onclickListener listener) {this.onclickListener = listener;}public void setonLongclicklistener(onLongclicklistener listener) {this.onLongclickListener = listener;}public interface onclickListener {void onclick(String value);}public interface onLongclicklistener {void onLongclick(String value);}}

外面传入数据调用即可:

MultiRectView multiRectView = findViewById(R.id.multiRectView);multiRectView.setonclicklistener(this);multiRectView.setonLongclicklistener(this);multiRectView.setScrollView(scrollView);ActiviesDataModel activiesDataModel1 = new ActiviesDataModel();activiesDataModel1.setPop_name(" POP Name1 万客隆精选超市");activiesDataModel1.setPop_address("南京东路1024弄");activiesDataModel1.setPopdb_id(215639);activiesDataModel1.setStart_time("06:40");activiesDataModel1.setEnd_time("08:30");ActiviesDataModel activiesDataModel2 = new ActiviesDataModel();activiesDataModel2.setPop_name(" POP Name2 京东自营超市");activiesDataModel2.setPop_address("南京东路1024弄");activiesDataModel2.setPopdb_id(215638);activiesDataModel2.setStart_time("09:10");activiesDataModel2.setEnd_time("11:50");ActiviesDataModel activiesDataModel3 = new ActiviesDataModel();activiesDataModel3.setPop_name(" POP Name3 拼多多百亿补贴超市");activiesDataModel3.setPop_address("南京东路1024弄");activiesDataModel3.setPopdb_id(215637);activiesDataModel3.setStart_time("12:40");activiesDataModel3.setEnd_time("14:30");ActiviesDataModel activiesDataModel4 = new ActiviesDataModel();activiesDataModel4.setPop_name(" POP Name4 淘宝天猫超市");activiesDataModel4.setPop_address("南京东路1024弄");activiesDataModel4.setPopdb_id(215636);activiesDataModel4.setStart_time("15:40");activiesDataModel4.setEnd_time("17:30");

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

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

相关文章

朗致面试---IOS/安卓/Java/架构师

朗致面试---IOS/安卓/Java/架构师 一、面试概况二、总结三、算法题目参考答案 一、面试概况 一共三轮面试&#xff1a; 第一轮是逻辑行测&#xff0c;25道题目&#xff0c;类似于公务员考试题目&#xff0c;要求90分钟内完成。第二轮是技术面试&#xff0c;主要是做一些数据结…

浅谈I-STARIS国际演艺集团为融合中国市场,开办的各类中式训练营

I-STARIS国际演艺集团给旗下各国演员们开办针对性的训练营&#xff0c;有针对中文基础的&#xff0c;有针对中国戏曲的&#xff0c;有针对中国武术的&#xff0c;不由让我们想到了老版《红楼梦》拍摄之前&#xff0c;演员们足足训练了三个月&#xff0c;才开始进入拍摄。1984年…

电脑怎么设置通电自动开机(工控机)

操作系统&#xff1a;win10 第一步&#xff0c;电脑开机时按del键进入bios页面。 第二步&#xff0c;选择advanced下的IT8712 Super IO Configuration 第三步&#xff0c;找到Auto Power On&#xff0c;将其从Power off设置为Power On 第四步&#xff0c;F10保存&#xff0c;大…

springboot+javafx使用aop切面导致的fx:id不能被注入问题

记录一个我遇到得问题 问题描述 我本来使用AOP切面来进行全局异常管理&#xff0c;但是使用AOP之后fxml中通过fx:id绑定得参数无法被注入 Slf4j Component Aspect public class GlobalExceptionAspect {AfterThrowing(pointcut "execution(* com.shkj.videoclassifica…

MATLAB图卷积神经网络GCN处理分子数据集节点分类研究

全文链接&#xff1a;https://tecdat.cn/?p38570 本文主要探讨了如何利用图卷积网络&#xff08;GCN&#xff09;对图中的节点进行分类。介绍了相关的数据处理、模型构建、训练及测试等环节&#xff0c;通过对分子数据集的操作实践&#xff0c;展示了完整的节点分类流程&#…

Ubuntu安装Gitlab详细图文教程

1、环境准备 1.1、Ubuntu环境 Ubuntu24.04Sever版安装教程 1.2、更新系统 sudo apt update -y sudo apt-get update sudo apt-get upgrade 2、安装Nginx 2.1 安装nginx # 安装 apt install nginx -y 2.2 修改nginx配置⽂件 # 修改nginx配置 vim /etc/nginx/si…

1. 机器学习基本知识(2)——机器学习分类

1.4 机器学习分类 1.4.1 训练监督 1. 监督学习&#xff1a;已对训练数据完成标记 分类&#xff1a;根据数据及其分类信息来进行训练&#xff0c;使模型能够对新的数据进行分类 回归&#xff1a;给出一组特征值来预测目标数值 2. 无监督学习&#xff1a;没有对训练数据进行任…

Jupyter Notebook 切换虚拟环境

方法 切换到需要添加到Jupyter Notebook中的虚拟环境&#xff0c;执行&#xff1a; python -m ipykernel install --name Jupyter Notebook中显示的虚拟环境名称如果遇到 [Errno 13] Permission denied: /usr/local/share/jupyter类似的权限问题&#xff0c;可能是没有对应的…

【游戏设计原理】7 - 加德纳的多元智能理论

虽然多元智能理论是对认知方式的分类&#xff0c;但它也可以为游戏设计提供丰富的思路和策略&#xff0c;帮助设计师创建更具吸引力、包容性和多样性的游戏。通过理解不同玩家的认知方式和优势&#xff0c;我们可以更精准地设计游戏的元素和玩法&#xff0c;使其能够吸引广泛的…

SAP MMPV报错MMPV_DATE_CHECK

异常提示&#xff1a;MMPV_DATE_CHECK检查失败&#xff0c;请参照NOTE 1082841。 解决方法&#xff1a; TCODE&#xff1a;SU3 在用户参数上增加&#xff1a;参数 MMPV_READ_NOTE 参数值&#xff1a;当天日期。

Flink CDC技术介绍

Flink CDC&#xff08;Change Data Capture&#xff09;是基于数据库的日志CDC技术&#xff0c;实现了全增量一体化读取的数据集成框架&#xff0c;可以高效地实现海量数据的实时集成。 Flink CDC是一种功能强大、灵活易用的数据集成框架&#xff0c;适用于多种实时数据处理场…

uni-app之web-view组件 postMessage 通信【跨端开发系列】

&#x1f517; uniapp 跨端开发系列文章&#xff1a;&#x1f380;&#x1f380;&#x1f380; uni-app 组成和跨端原理 【跨端开发系列】 uni-app 各端差异注意事项 【跨端开发系列】uni-app 离线本地存储方案 【跨端开发系列】uni-app UI库、框架、组件选型指南 【跨端开…

机器学习辅助天线性能极限突破

电磁超构表面与天线技术的结合离不开三个尺度下对三个方面的考虑&#xff0c;即微观的单元、介观的排布、宏观的性能这三个尺度的分析、综合与调控。在单元设计层面&#xff0c;目前主要依靠经验和大规模数值迭代&#xff0c;耗时长、成功率不稳定、通用性较差&#xff1b;在阵…

Deveco报错Only files in a module can be previewed

创建工程后需要看看预览的效果&#xff0c;却出现了这个错误 到Index.ets文件下重新构建工程 详细可以查询 鸿蒙报错&#xff08;Only files in a module can be previewed&#xff09;

uniappp配置导航栏自定义按钮(解决首次加载图标失败问题)

1.引入iconfont的图标&#xff0c;只保留这两个文件 2.App.vue引入到全局中 import "./static/fonts/iconfont.css"3.pages.json中配置text为图标对应的unicode {"path": "pages/invite/invite","style": {"h5": {"…

ubuntu22.04 使用crash

文章目录 前言一、apt 安装dbgsym vnlinux二、使用.ddeb包安装dbgsym vnlinux三、dbgsym发行版四、crash调试参考资料 前言 最近在适配 ubuntu系统&#xff0c;记录一下其crash的安装。 一、apt 安装dbgsym vnlinux # echo "deb http://ddebs.ubuntu.com $(lsb_release…

EDA - Spring Boot构建基于事件驱动的消息系统

文章目录 概述事件驱动架构的基本概念工程结构Code创建事件和事件处理器创建事件总线创建消息通道和发送逻辑创建事件处理器消息持久化创建消息发送事件配置 Spring Boot 启动类测试消息消费运行项目 概述 在微服务架构和大规模分布式系统中&#xff0c;事件驱动架构&#xff…

CAD C# 批量替换当前图中块、标注

本案例功能为选择当前文档中一个块&#xff08;旧块&#xff09;&#xff0c;然后选择新图元&#xff08;新块&#xff09;&#xff0c;运行插件后新块将替换图中所有的旧块。 效果如下&#xff1a; public static class Class1{//选取对象替换块定义[CommandMethod("TT&…

SpringBoot快速使用

一些名词的碎碎念: 1> 俩种网络应用设计模式 C/S 客户端/服务器 B/S 浏览器/服务器 俩者对比: 2> 集群和分布式的概念 集群: 分布式: 例子: 一个公司有一个人身兼多职 集群: 招聘N个和上面这个人一样身兼多职 分布式: 招聘N个人,分担上面这个人的工作,进行工作的拆分. 工…

苹果公司即将为iPhone和智能家居改用自主研发的蓝牙和Wi-Fi芯片

美股快讯&#xff1a;苹果公司即将为iPhone和智能家居改用自主研发的蓝牙和Wi-Fi芯片 苹果公司计划从明年开始在其设备上改用国产芯片进行蓝牙和Wi-Fi连接&#xff0c;此举将逐步淘汰目前由博通提供的部分部件。这种代号为Proxima的芯片已经开发了数年&#xff0c;现在计划用于…