You could program the main loop more elegantly by using fputcsv(), which handles formatting problems (see Listing 3).
您可以使用fputcsv()更便捷地对主循环编程,fputcsv() 能够帮助处理格式化问题(参见清单3)。
Listing 3 shows the remainder of the main logic loop.
清单3显示了主逻辑循环的其余部分。
Listing 5 shows the remainder of the main logic loop.
清单5显示了主逻辑循环的其余部分。
Listing 2 shows the beginning of the main processing loop.
清单2显示了主处理循环的开头。
Essentially, the strategy is to create a bunch of widgets with callbacks, then enter a main event loop.
本质上,这个策略是创建带回调的一串窗口小部件,然后进入一个主事件循环。
The main thing to understand is that Psyco is useful for handling blocks that loop many times, and it knows how to optimize operations involving integers and floating point numbers.
主要是要明白Psyco对于处理多次循环的块是很有用的,而且它知道如何优化涉及整数和浮点数的操作。
The digital techniques are widely used in the receiver design and the main loop program is executed in DSP TMS320C25.
在接收机的设计中,较多地采用了数字化技术,使用数字信号处理芯片TMS320C 25完成主要的环路运算工作。
To switch between modes, an additional check is required in each pass of the main program loop.
要在模式间进行切换,需要对主程序循环的每次循环执行额外的检查。
In the infinite loop case above, all threads except main are in a waiting state (on a semaphore, or waiting for some event).
在上述死循环的情况下,所有除主线程之外的线程都处于某种等待状态(等待一个信号量,或等待某个事件)。
The first part of the thesis describes the design and realized scheme of the systematic hardware. It is divided into the designs of control loop and main loop.
论文的第一部分介绍了系统的硬件设计思路及实现方案,它包括控制回路的设计和主回路的设计两部分。
The window is displayed on the screen, and the application activates the main loop by calling gtk_main .
在屏幕上显示窗口,应用程序调用gtk_main,激活主循环。
The main loop enters an indefinite loop, waiting for events and calling callbacks, until someone calls gtk_main_quit() by closing the window.
主循环进入无限循环,等候事件并调用回调,直到有人关闭窗口,调用 gtk_main_quit() 为止。
Listing 10 shows the continuation of the main processing loop after the cnee events are read.
清单10展示了读取cnee事件后主处理循环的后面部分。
In my experience, it will usually be a particular inner or nested loop, or a call to some third party library methods, which is the main culprit for running the program slow.
以我的经验来看,导致程序运行速度慢得罪魁祸首可能就是某个内部或嵌套循环,也可能是对第三方库函数的调用。
For example, a compiler may choose to optimize a loop index variable by storing it in a register, or the cache may delay flushing a new value of a variable to main memory until a more opportune time.
例如,编译器为了优化一个循环索引变量,可能会选择把它存储到一个寄存器中,或者缓存会延迟到一个更适合的时间,才把一个新的变量值存入主存。
When an event occurs, the object associated with that event emits a signal to inform the main loop that it has occurred.
当事件发生时,与这个事件对应的对象发出信号,通知主循环事件已经发生。
The main loop then looks through its internal mapping table between its signals and handlers, also called callbacks, and calls the handlers registered for the given signal on the given object.
然后主循环查询自己的信号和处理程序之间的内部映射表,也叫做回调,并调用注册到指定对象的指定信号的处理程序。
Listing 3 starts the main program loop and reads the synclient output.
清单3将启动主程序循环并读取synclient输出。
With the base variable declarations and subroutine complete, the program moves on to the main program loop, shown below.
完成了基本变量声明和子例程后,程序将继续进行主程序循环,如下所示。
After the module includes and the initial variable declarations, the main control loop is entered.
在模块include语句和初始变量声明之后,进入主控制循环。
You create the necessary network listening sockets, register the events to be called during execution, and then start the main event loop with the libev handling the rest of the process.
创建所需的网络监听套接字,注册在执行期间要调用的事件,然后启动主事件循环,让libev处理过程的其余部分。
By doing so, the loop in the main scope and logic in the event handler controls the final number of event handler instances.
这样,主范围内的循环和事件处理程序中的逻辑就可以控制事件处理程序的最终数目。
Multithreading your application improves the responsiveness of your user interface by moving long calculations into separate threads and away from your main event loop.
将长时间的计算从主事件循环线程移到别的线程中,从而提高用户接口的响应速度。
Then, each pass of the main loop checks for events, resets the draw state, draws the circular "portal" windows, then animates their distortion back to the current time frame.
随后,主循环在每次循环时都检查事件、重置绘图状态、绘出圆形的“门户”窗口,然后以动画形式将其失真返回当前时帧。
In the main program loop, there is no need for the code that ignores the header lines and the first two lines of input.
在主程序循环中,代码无需忽略标题行和输入的前两行。
Listing 4 shows the beginning of the three-finger detection in the main program loop.
清单4显示了主程序循环中的三指检测的开始部分。
Based on the discussion on the formation of the main loop and control strategy, the construction scheme of the control system for high-voltage rectifying circuit is presented.
通过对主回路的构成和控制策略的讨论,提出了高压整流电路的控制系统的构成方案。
The main loop includes a three-phase bridge, an inverter module with three IGBT power tubes, a braking circuit and protecting circuits, etc.
系统主回路含三相全波整流桥电路,三对IGBT功率管组成的逆变器电路,制动电路及保护电路等。
This thesis sets forth the merit and flaw of excitation system and other concerned problems of main loop, magnetizing field loop and de-excitation loop in detail.
本文详细阐述了这一励磁方式的优点和缺点,讨论了自并励励磁系统设计中主回路、起磁回路、灭磁回路的有关问题。
The main loop operates on a continuous check-dispatch-sleep cycle.
主循环在连续的检查-分配-睡眠周期上操作。
应用推荐