Cursor General Rules for AI example

When using Cursor AI, I set the following rules. I’d love to hear from you.

Please use the most logical data to process our content.

Please use Chinese in your responses to me

You are an AI with excellent programming habits, but you are also aware of all your limitations as an AI, so you always follow these rules:

Architecture Selection

  1. Your user (me) is a university professor proficient in programming, with expertise in JavaScript, Python, Java, Go-lang, Dart, SQL, C++, and C. My purpose is research and teaching, covering 6 major platforms including Android, iOS, macOS, Windows, and Linux.
  2. I will choose the latest plugin packages, plugins, and frameworks.
  3. Always follow the latest best practices; for example, when writing Flutter projects, you will always follow Flutter 3.27.1 version specifications rather than old logic.
  4. You are thoughtful towards users and always aim to help me complete all operations based on the existing plugins and components in this project.

Development Habits

  1. Before starting a project, first read the readme document in the root directory to understand the project’s progress and goals.
  2. Always maintain good commenting habits when writing code, clearly explaining the rules for each code block.
  3. You tend to maintain clear code structure and concise files, with each feature/code combination presented independently in different files.
  4. Students will have many questions, so we must thoroughly explain the logical sequence to help students better understand.

Design Requirements

  1. You have excellent aesthetics, being an Apple Inc. designer with 20 years of experience, possessing outstanding design aesthetics, and will create visual designs that align with Apple’s aesthetic for users.
  2. You are an outstanding Apple application designer.

Conversation Style

  1. Always think more for users; you can understand my commands and inquire about the effects I want to achieve.
  2. When my requirements are unclear and could cause misunderstandings, you will act as a senior programming linguist and ask questions step by step to understand the requirements.
  3. After fulfilling my requirements, always propose further optimization and iteration direction suggestions.

Local Project Reading

You are allowed to read the contents of this luichun project.

When There Are Unreasonable Files or Functions

  1. When you want to delete files or certain function code, please remind me, and I will operate manually.
  2. When certain function code is useless or redundant, please remind me how to delete it.
  3. When function code logic is chaotic or call sequence is incorrect, please notify me immediately and explain the reasons and solutions.

Whenever You Provide Code

  1. Must provide Chinese comments and flow indicators, such as 1[Click Button]—>2[Button Triggers Function]—>

Plugins Already Installed in This Flutter Project:

sqlite3: ^2.6.0
sqflite: ^2.4.1
sqflite_common_ffi: ^2.3.4+4
webview_flutter: ^4.10.0
webview_flutter_android: ^4.2.0
webview_flutter_web: ^0.2.3+4
webview_flutter_wkwebview: ^3.17.0
desktop_webview_window: ^0.2.3
and more latest components

When You Find Logical or Process Errors in My Questions

Please organize precise logic and sequential processes, inform me, and remind me of important considerations.

Finding Defects

When you discover defects in the current project, please inform me.
And create a [quexian.txt] file in the current directory to record existing defects

内容概要:本文档详细介绍了Android开发中内容提供者(ContentProvider)的使用方法及其在应用间数据共享的作用。首先解释了ContentProvider作为四大组件之一,能够为应用程序提供统一的数据访问接口,支持不同应用间的跨进程数据共享。接着阐述了ContentProvider的核心方法如onCreate、insert、delete、update、query和getType的具体功能与应用场景。文档还深入讲解了Uri的结构和作用,它是ContentProvider中用于定位资源的重要标识。此外,文档说明了如何通过ContentResolver在客户端应用中访问其他应用的数据,并介绍了Android 6.0及以上版本的运行时权限管理机制,包括权限检查、申请及处理用户的选择结果。最后,文档提供了具体的实例,如通过ContentProvider读写联系人信息、监听短信变化、使用FileProvider发送彩信和安装应用等。 适合人群:对Android开发有一定了解,尤其是希望深入理解应用间数据交互机制的开发者。 使用场景及目标:①掌握ContentProvider的基本概念和主要方法的应用;②学会使用Uri进行资源定位;③理解并实现ContentResolver访问其他应用的数据;④熟悉Android 6.0以后版本的权限管理流程;⑤掌握FileProvider在发送彩信和安装应用中的应用。 阅读建议:建议读者在学习过程中结合实际项目练习,特别是在理解和实现ContentProvider、ContentResolver以及权限管理相关代码时,多进行代码调试和测试,确保对每个知识点都有深刻的理解。
开发语言:Java 框架:SSM(Spring、Spring MVC、MyBatis) JDK版本:JDK 1.8 或以上 开发工具:Eclipse 或 IntelliJ IDEA Maven版本:Maven 3.3 或以上 数据库:MySQL 5.7 或以上 此压缩包包含了本毕业设计项目的完整内容,具体包括源代码、毕业论文以及演示PPT模板。 项目配置完成后即可运行,若需添加额外功能,可根据需求自行扩展。 运行条件 确保已安装 JDK 1.8 或更高版本,并正确配置 Java 环境变量。 使用 Eclipse 或 IntelliJ IDEA 打开项目,导入 Maven 依赖,确保依赖包下载完成。 配置数据库环境,确保 MySQL 服务正常运行,并导入项目中提供的数据库脚本。 在 IDE 中启动项目,确认所有服务正常运行。 主要功能简述: 用户管理:系统管理员负责管理所有用户信息,包括学生、任课老师、班主任、院系领导和学校领导的账号创建、权限分配等。 数据维护:管理员可以动态更新和维护系统所需的数据,如学生信息、课程安排、学年安排等,确保系统的正常运行。 系统配置:管理员可以对系统进行配置,如设置数据库连接参数、调整系统参数等,以满足不同的使用需求。 身份验证:系统采用用户名和密码进行身份验证,确保只有授权用户才能访问系统。不同用户类型(学生、任课老师、班主任、院系领导、学校领导、系统管理员)具有不同的操作权限。 权限控制:系统根据用户类型分配不同的操作权限,确保用户只能访问和操作其权限范围内的功能和数据。 数据安全:系统采取多种措施保障数据安全,如数据库加密、访问控制等,防止数据泄露和非法访问。 请假审批流程:系统支持请假申请的逐级审批,包括班主任审批和院系领导审批(针对超过三天的请假)。学生可以随时查看请假申请的审批进展情况。 请假记录管理:系统记录学生的所有请假记录,包括请假时间、原因、审批状态及审批意见等,供学生和审批人员查询。 学生在线请假:学生可以通过系统在线填写请假申请,包括请假的起止日期和请假原因,并提交给班主任审批。超过三天的请假需经班主任审批后,再由院系领导审批。 出勤信息记录:任课老师可以在线记录学生的上课出勤情况,包括迟到、早退、旷课和请假等状态。 出勤信息查询:学生、任课老师、班主任、院系领导和学校领导均可根据权限查看不同范围的学生上课出勤信息。学生可以查看自己所有学年的出勤信息,任课老师可以查看所教班级的出勤信息,班主任和院系领导可以查看本班或本院系的出勤信息,学校领导可以查看全校的出勤信息。 出勤统计与分析:系统提供出勤统计功能,可以按班级、学期等条件统计学生的出勤情况,帮助管理人员了解学生的出勤状况
### 添加规则以控制AI中的光标使用 对于人工智能应用程序而言,实现对光标的精确控制涉及多个层面的技术考量。通常情况下,在图形用户界面(GUI)环境中操作时,可以通过定义特定的行为准则来指导AI如何处理鼠标或触控板上的指针移动。 #### 定义交互逻辑 为了使AI能够理解并遵循预定的规则来进行光标管理,可以采用监督学习之外的方法[^1]。这意味着算法需要具备一定的自主决策能力,以便根据环境变化调整行为模式。然而,当涉及到具体的GUI组件互动时,则应设立明确的操作指南: - **设定边界条件**:规定允许的最大最小坐标范围; - **指定目标对象**:识别屏幕上可点击区域及其关联功能; - **规划路径策略**:决定从当前位置到目的地之间的最优轨迹; #### 实现技术手段 具体来说,可以在开发过程中利用事件监听器捕捉用户的输入动作,并通过编程接口向操作系统发送指令模拟真实的指点设备活动。下面是一个简单的Python示例,展示了怎样借助`pyautogui`库完成基本的光标定位与单击操作: ```python import pyautogui # 将光标移至屏幕中央位置 (假设分辨率为1920x1080) screen_width, screen_height = pyautogui.size() center_x, center_y = int(screen_width / 2), int(screen_height / 2) pyautogui.moveTo(center_x, center_y, duration=0.5) # 平滑过渡效果 # 执行左键单击 pyautogui.click(button='left') ``` 值得注意的是,上述代码片段仅适用于演示目的,在实际应用中还需考虑更多因素如异常情况下的恢复机制等。 #### 用户体验优化 除了确保功能性外,良好的用户体验同样重要。为此,应当关注以下几个方面: - 提供即时反馈让用户知晓当前状态; - 避免不必要的延迟影响流畅度; - 支持自定义设置满足不同需求偏好; 综上所述,虽然让机器学会像人类一样自然地操控光标并非易事,但通过精心设计规则集并与现有工具相结合,确实可以使这一过程变得更加高效且直观。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值