
ACP续证的PDU主要有两种获取途径:“接受教育”和“提供专业贡献”。PDU全称为ProfessionalDevelopment
Units,也叫专业发展单元,是一个考核单位。ACP续证要求持证者在证书三年有效期内积攒30个PDU。
PDU的获取途径:
1、通过面对面课程或在线课程、阅读论文、观看培训视频、接受指导或教育等方式获得PDU。
2、通过“专业贡献”(GivingBacktothe
Profession)获得最多20个PDU。此类活动包括编写/联合撰写教科书或论文,参加网络研讨会或播客,开发课程或在活动上发言等。
免费领取ACP学习资料、知识地图:>
typedef struct itemList
{
int id;//当前物品ID
int pUnits;//可制作的物品的ID数组
int nUnits;//制作当前物品需要的ID数组
}IIT;
我这里ID数组用指针,是考虑数组大小不定,后面用动态数组申请。要是你程序限时固定大小,可改成数组。
一个struct itemList类型变量表示一个物品。pUnits里存放一组物品ID,表示该物品可以参与制作的物品ID,比如木头可以制作石斧、弓箭、木剑,那么在木头这个物品成员pUnits里就存放石斧、弓箭、木剑的ID。
这样,当你把一个物品放在工作台,就可以读取它的pUnits成员获取一组ID,当你再放一个物品在工作台时,再读取它的pUnits成员获取一组ID,两组比较保留重复的ID。
而成员nUnits的作用是:当保留的ID只剩下一个的时候,通过ID找到要制作物品的结构变量,通过它的成员nUnits就可知道这个物品共需要那些材料,和当前工作台上物品匹配,就知道是否可以制作或还需补充物品。
androidviewVelocityTracker主要用跟踪触摸屏事件(flinging事件和其他gestures手势事件)的速率。用addMovement(MotionEvent)函数将Motion event加入到VelocityTracker类实例中你可以使用getXVelocity() 或getXVelocity()获得横向和竖向的速率到速率时,但是使用它们之前请先调用computeCurrentVelocity(int)来初始化速率的单位 。
主要函数
Public Methods
void addMovement(MotionEvent event)
Add a user's movement to the tracker
void clear()
Reset the velocity tracker back to its initial state
void computeCurrentVelocity(int units, float maxVelocity)
Compute the current velocity based on the points that have been collected
int unitis表示速率的基本时间单位。unitis值为1的表示是,一毫秒时间单位内运动了多少个像素, unitis值为1000表示一秒(1000毫秒)时间单位内运动了多少个像素
floatVelocity表示速率的最大值
void computeCurrentVelocity(int units)
Equivalent to invoking computeCurrentVelocity(int, float) with a maximum velocity of FloatMAX_VALUE
abstract T getNextPoolable()
float getXVelocity()
Retrieve the last computed X velocity
float getXVelocity(int id)
Retrieve the last computed X velocity
float getYVelocity(int id)
Retrieve the last computed Y velocity
float getYVelocity()
Retrieve the last computed Y velocity
abstract boolean isPooled()
static VelocityTracker obtain()
Retrieve a new VelocityTracker object to watch the velocity of a motion
void recycle()
Return a VelocityTracker object back to be re-used by others
abstract void setNextPoolable(T element)
abstract void setPooled(boolean isPooled)
示例:
private VelocityTracker mVelocityTracker;//生命变量
//在onTouchEvent(MotionEvent ev)中
if (mVelocityTracker == null) {
mVelocityTracker = VelocityTrackerobtain();//获得VelocityTracker类实例
}
mVelocityTrackeraddMovement(ev);//将事件加入到VelocityTracker类实例中
//判断当ev事件是MotionEventACTION_UP时:计算速率
final VelocityTracker velocityTracker = mVelocityTracker;
// 1000 provides pixels per second
velocityTrackercomputeCurrentVelocity(1, (float)001); //设置maxVelocity值为01时,速率大于001时,显示的速率都是001,速率小于001时,显示正常
Logi("test","velocityTraker"+velocityTrackergetXVelocity());
velocityTrackercomputeCurrentVelocity(1000); //设置units的值为1000,意思为一秒时间内运动了多少个像素
Logi("test","velocityTraker"+velocityTrackergetXVelocity());
大体的使用是这样的:
当你需要跟踪触摸屏事件的速度的时候,使用obtain()方法来获得VelocityTracker类的一个实例对象
在onTouchEvent回调函数中,使用addMovement(MotionEvent)函数将当前的移动事件传递给VelocityTracker对象
使用computeCurrentVelocity (int units)函数来计算当前的速度,使用 getXVelocity ()、 getYVelocity ()函数来获得当前的速度
以上就是关于ACP续证的PDU怎么获取全部的内容,包括:ACP续证的PDU怎么获取、c语言可以做合成表吗、Android如何较为精确获取到当前移动速度等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)