public synchronized List<Task> assignTasks(TaskTrackerStatus taskTracker)
throws IOException {
ClusterStatus clusterStatus = taskTrackerManager.getClusterStatus();
int numTaskTrackers = clusterStatus.getTaskTrackers();
Collection<Job[......]
public synchronized List<Task> assignTasks(TaskTrackerStatus taskTracker)
throws IOException {
ClusterStatus clusterStatus = taskTrackerManager.getClusterStatus();
int numTaskTrackers = clusterStatus.getTaskTrackers();
Collection<Job[......]
sudo apt-get install recordmydesktop gtk-recordmydesktopu
录出来默认是ogv,射手、暴风都能播,我们也可以转换成avi的。
#有声音
mencoder out.ogv -o out.avi -oac mp3lame -ovc lavc
#无声音
mencoder out.ogv -o out.avi -nosound -ovc lavc[......]
在stdout下用printf等输出很好的,到了GtkTextView就不对劲了,经过检查,是字体的问题。
默认使用中文字体,就会出现不对齐的情况。
如下解决:
PangoFontDescription *mFontText;
mFontText = pango_font_description_from_string("Monospace 10");//设置字体
gtk_widget_modify_font(mText, mFontText);[......]
转载自:http://blog.s135.com/post/419/
Valgrind 是一款 Linux下(支持 x86、x86_64和ppc32)程序的内存调试工具,它可以对编译后的二进制程序进行内存使用监测(C语言中的malloc和free,以及C++中的new和delete),找出内存泄漏问题。
Valgrind 中包含的 Memcheck 工具可以检查以下的程序错误:
使用未初始化的内存 (Use of uninitialised memory)
使用已经释放了的内[......]
转载自:http://blog.csdn.net/ustcxiangchun/archive/2009/09/01/4508086.aspx
这个例子的作用就是把当前时间显示到窗口中,即显示了一个实时时钟。
//~~~~~~~ begin of program ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <cairo.h>
#include <gtk/gtk.h>
#include <time.h[......]