我正在尝试将我的代码从Jboss 5.1更新到Jboss 7,我发现jboss-as-7.1有自己的日志框架.我想知道在log4j上使用jboss自己的日志框架的主要区别和优点.我还需要一个如何在此框架中使用appender的示例.
我是c ++编程的新手,今天我正尝试使用CImg保存图像。CImg是C ++模板图像处理库。
我写的基本代码是(请原谅任何语法错误,作为我代码的复制部分):
#include "CImg.h"// Include CImg library header.
#include <iostream>
using namespace cimg_library;
using namespace std;
const int screen_size = 800;
//-------------------------------------------------------------------------------
// Main procedure
//-------------------------------------------------------------------------------
int main()
{
CImg<unsigned char> img(screen_size,screen_size,1,3,20);
CImgDisplay disp(img, "CImg Tutorial");
//Some drawing using img.draw_circle( 10, 10, 60, RED);
img.save("result.jpg"); // save the image
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但是我不能运行我的程序,因为它说:
Invalid Parameter - 100%
'gm.exe' is not recognized as an internal or external command,
operable program or batch file.
This application has requested the Runtime …Run Code Online (Sandbox Code Playgroud) 我有两个应用程序First Application将在while循环中持久存储到数据库中,循环将在很长一段时间后结束(例如10-15分钟).但是第二个应用程序需要第一个应用程序已经存储在数据库中的数据,第二个应用程序不能等待第一个应用程序完成.它将在第一个应用程序开始运行后启动. 我在第一个应用程序中使用了EntityManager.flush(),希望第一个应用程序能够立即将数据与数据库同步.这样,处于不同事务中的第二个应用程序就可以开始处理数据了.
这不起作用,flush()方法的目的是什么,以及如何解决我的问题?请帮忙 !!