谁知道explain怎么用啊?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了谁知道explain怎么用啊?相关的知识,希望对你有一定的参考价值。

explain
v
[Tn, Tw, Dn.pr] ~ sth (to sb) make sth plain or clear; give the meaning of sth 解释; 讲解; 说明; 阐明: A dictionary explains the meaning of words. 词典是解释词义的工具书. * He explained his plan in some detail. 他仔细地说明了自己的计划. * Could you explain why you left? 你能说说你为什麽离开的吗? * Please explain this problem to me. 请把这个问题给我讲解一下.
[Tn, Tf, Tw, Dn.pr, Dpr.f, Dpr.w] ~ sth (to sb) give or be a reason for sth; account for sth 说明某事物的原因或理由; 为某事物辩解: That explains his absence. 那就是他缺席的原因. * He explained that his train had been delayed. 他解释说他乘坐的火车误点了. * They explained what had happened. 他们为所发生的事进行了辩解. * She explained her conduct to her boss. 她向老板说明了自己那种表现的原因. * She explained to the children that the school had been closed. 她向孩子们解释说学校已经关门了. * The manager has explained to customers why the goods were late. 经理已向顾客解释货物晚到的原因.
(idm 习语) ex`plain oneself (a) make one's meaning clear 把自己的意思解释清楚: I don't understand your argument. Could you explain yourself a bit more? 我不明白你的论点, 你能把意思再说清楚些吗? (b) give reasons for one's behaviour 为自己的行为作解释: In recent weeks you've been late every day. Please explain yourself. 近几个星期以来你每天都迟到. 请你说说原因.
(phr v) explain sth away give excuses why one should not be blamed for (a fault, mistake, etc) or why sth is not important 为(过失或错误等)辩解; 为某事物搪塞: You will find it difficult to explain away your use of such offensive language. 你使用这样无礼的语言是很难说得过去的. * He explained away his late arrival by blaming it on the crowded roads. 他辩称路上人多而把迟到一事推脱得一乾二净.
参考技术A The boy ________ us that he had never heard of the story.

A. talked to B. explained to

C. spoke to D. said to

【答案】B

【解析】本题考查动词用法辨析。talk可用短语talk to sb. about sth. 但talk是不及物动词,其后不能带that从句。explain可用短语explain sth. to sb.,当用从句表示事物时,结构应为explain to sb. that...。speak作及物动词时,宾语通常是语言,不能跟that从句,作不及物动词时用speak to do.。say to sb. 后面可跟直接引语,用间接引语时必须改用tell sb. that...。本回答被提问者采纳
参考技术B explain 抱怨

explain about sth 抱怨某事

请问,谁知道VC中的SetTimer怎么用?

rt.能不能说的详细些.

1. SetTimer ---The SetTimer function creates a timer with the specified time-out value.
(这个函数创建一个指定时间值的定时器)
2.SetTimer原型:(摘于MSDN)
UINT_PTR SetTimer(
HWND hWnd, // handle to window(与那个窗口建立联系)
UINT_PTR nIDEvent, // timer identifier(该定时器的标志)
UINT uElapse, // time-out value(触发时间)
TIMERPROC lpTimerFunc // timer procedure(回调函数,若NULL则发WM_TIMER消息)
);
3.细讲定时器:
第一个参数:1、NULL,则第二个参数随之被忽视
2、窗口句柄,则与该窗口建立联系,会向该窗口发送消息(当第四个参数为NULL)
第二个参数:窗口的标志,如果创建了多个定时器,如果标志一样,那么系统会采用标志最高的那位。(也就是给每一个定时器取个名字,用于系统分别)
第三个参数:触发时间
第四个参数:如果NULL则向建立窗口的函数发送WM_TIMIER消息,如果指定函数,由系统自动调用该回调函数
回调函数原型:
UINT SetTimer
(
HWND hWnd,
UINT nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
参考技术A 嗯,SetTimer 这个函数嘛
它是用来实现VC,VB中托管代码程序中的 时钟控件的的功能的
哈哈,它不像楼上说的什么,设置系统的时间

看哈,我来教你
BOOL CMy121Dlg::OnInitDialog()

......
SetTimer(0,100,NULL);
.......

我添加了这个函数在初使化的函数里
这个函数的意义是
SetTimer(
参数一:每个周期触发的事件代号,数字形,如 1 为事件一
参数二:发生这个事件的周期
参数三:每发生这个事件时,要执行的函数
)
每发生一次事件,这个函数会向窗口发送一个WM_TIMER 消息,这个消息的WPARAM 参数就是 参数一 :)
可以在消息映射里加入代码来周期执行某件事
我只是介绍了这个函数的用法,有关其它的,具体的是例,你可以加我QQ:1125591 我可以教你,反正署假无聊,不过过了署假,就没时间了,高三了,要好好读书了
参考技术B 函数名: settime
功 能: 设置系统时间
用 法: void settime(struct time *timep);
程序例:

#include <stdio.h>
#include <dos.h>

int main(void)

struct time t;

gettime(&t);
printf("The current minute is: %d\n", t.ti_min);
printf("The current hour is: %d\n", t.ti_hour);
printf("The current hundredth of a second is: %d\n", t.ti_hund);
printf("The current second is: %d\n", t.ti_sec);

/* Add one to the minutes struct element and then call settime */
t.ti_min++;
settime(&t);

return 0;
参考技术C MSDN的详细说明,看不懂去查字典
SetTimer Function

--------------------------------------------------------------------------------

The SetTimer function creates a timer with the specified time-out value.

Syntax

UINT_PTR SetTimer( HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
Parameters

hWnd
[in] Handle to the window to be associated with the timer. This window must be owned by the calling thread. If this parameter is NULL, no window is associated with the timer and the nIDEvent parameter is ignored.
nIDEvent
[in] Specifies a nonzero timer identifier. If the hWnd parameter is NULL, this parameter is ignored. If the hWnd parameter is not NULL and the window specified by hWnd already has a timer with the value nIDEvent, then the existing timer is replaced by the new timer. When SetTimer replaces a timer, the timer is reset. Therefore, a message will be sent after the current time-out value elapses, but the previously set time-out value is ignored.
uElapse
[in] Specifies the time-out value, in milliseconds.
Windows NT/2000/XP: If uElapse is greater than 0x7fffffff, the timeout is set to 1.

Windows 2000/XP: If uElapse is less than 10, the timeout is set to 10.

Windows Server 2003: If uElapse is greater than 0x7fffffff, the timeout is set to 0x7fffffff.

lpTimerFunc
[in] Pointer to the function to be notified when the time-out value elapses. For more information about the function, see TimerProc. If lpTimerFunc is NULL, the system posts a WM_TIMER message to the application queue. The hwnd member of the message's MSG structure contains the value of the hWnd parameter.
Return Value

If the function succeeds and the hWnd parameter is NULL, the return value is an integer identifying the new timer. An application can pass this value to the KillTimer function to destroy the timer.

If the function succeeds and the hWnd parameter is not NULL, then the return value is a nonzero integer. An application can pass the value of the nIDEvent parameter to the KillTimer function to destroy the timer.

If the function fails to create a timer, the return value is zero. To get extended error information, call GetLastError.

Remarks

An application can process WM_TIMER messages by including a WM_TIMER case statement in the window procedure or by specifying a TimerProc callback function when creating the timer. When you specify a TimerProc callback function, the default window procedure calls the callback function when it processes WM_TIMER. Therefore, you need to dispatch messages in the calling thread, even when you use TimerProc instead of processing WM_TIMER.

The wParam parameter of the WM_TIMER message contains the value of the nIDEvent parameter.

The timer identifier, nIDEvent, is specific to the associated window. Another window can have its own timer which has the same identifier as a timer owned by another window. The timers are distinct.

SetTimer can reuse timer IDs in the case where hWnd is NULL.

Example

For an example, see Creating a Timer.

Function Information

Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1

最简单的使用方法

SetTimer( hWnd, 1, 1000, NULL);

定义一个一秒的定时器(1000 就是一秒,100就是0.1秒),NULL比表示不使用函数过程,相应WM_TIMER 消息。 hWnd 为窗口的句柄,此窗体接受WM_TIMER 消息. 也就是说你的要没一秒重运行的东西放到这个消息的过程里就行了。

例如
…………
case WM_TIMER : //假如这是一个消息循环处理过程。。

MessageBox(hWnd,…………); //没秒钟出来一个提示框

break;

1 为定时器标号,用于不需要定时器时调用 KillTimer释放。

以上是关于谁知道explain怎么用啊?的主要内容,如果未能解决你的问题,请参考以下文章

explain是啥意思

explain查看和分析执行计划

MySQL索引优化-性能分析Explain(转)

[mysql 2019-09-29] explain详解

Mysql调优之查看explain命令

MySQL-explain