我正在尝试使用加载的csv文件在两种类型的节点之间创建关系.我已经创建了所有电影和关键字节点.我还创建了索引:电影(标题)和:关键字(单词).
我的csv文件看起来像:
"title"|年|"word"//标题
"进入狂野"| 2007 |"1990"//与标题,年份和关键字一致
"走进野外"| 2007 |"废弃的公共汽车"
我的查询:
LOAD CSV WITH HEADERS FROM "file:/home/gondil/temp.csv" AS csv
FIELDTERMINATOR '|'
MATCH (m:Movie {title:csv.title,year: toInt(csv.year)}), (k:Keyword {word:csv.word})
MERGE (m)-[:Has {weight:1}]->(k);
Run Code Online (Sandbox Code Playgroud)
查询运行大约一个小时,而不是显示错误"未知错误".多余的错误描述.
我认为这是由于160K关键词和超过1M电影以及csv中超过4M行.所以我将csv简化为一行,它仍然运行大约15分钟,没有停止.
问题出在哪儿?如何编写查询以创建2个已创建的节点之间的关系?
我也可以删除所有节点并以其他方式构建我的数据库,但最好不要删除所有创建的节点.
注意:我不应该遇到硬件问题,因为我使用的是我们教员的Super PC.
我正在尝试用C#编写代码,用于PUT和GET到我的弹性搜索数据.我像这样为PUT键入代码,它似乎有效:
string url = "http://localhost:9200/my_index/my_type/";
JsonDocFormat json = new JsonDocFormat()
{
name = "John"
};
string s = JsonConvert.SerializeObject(json);
using (var client = new WebClient())
{
client.UploadString(url, "POST", s);
}
Run Code Online (Sandbox Code Playgroud)
但我不能为这个GET编写代码:
GET my_index/my_type/_search
{
"query" : {
"match" : {
"name" : "john"
}
}
}
Run Code Online (Sandbox Code Playgroud)
我试过这样的事情:
string url_req = "http://localhost:9200/my_index/my_type/_search?pretty";
string s1 = "{\"query\": {\"match\": { \"name\" : \"john\" }}}";
string s_req = url_req + s1;
using (var client = new WebClient())
{
Console.Write(client.DownloadString(s_req));
}
Run Code Online (Sandbox Code Playgroud)
但是这段代码返回了与此GET相同的输出:
GET /my_index/my_type/_search
Run Code Online (Sandbox Code Playgroud)
它没有抛出任何错误,但它绝对忽略了URL末尾的json体.我想在没有任何外部包(如NEST或Elasticsearch.NET)的情况下编写它,只需使用HTTP. …
我正在开发一个C++程序,该程序应该检测来自网络摄像头流的面部,而不是使用面部标记裁剪它们并交换它们.
我使用OpenCV和Viola-Jones人脸检测编程了人脸检测.工作良好.比我搜索如何从ROI分割面部.我尝试了很少的皮肤检测实现,但没有一个成功.
比我发现dlib面临的地标.我决定尝试一下.刚开始时我遇到了问题,因为我必须转换cv::Mat为cv_image,Rect转矩形等等.所以我试着用dlib做.我只是使用流cv::VideoCapture而不是我想显示使用dlib捕获的内容image_window.但这是问题,它是reeeealy慢.Down是使用代码.注释行是使用OpenCV执行相同操作的行.OpenCV比没有评论的代码更快,更平滑,更连续,低于5 FPS.那太糟了.我无法想象当我应用面部检测和面部地标时会有多慢.
难道我做错了什么?我怎样才能让它更快?或者我应该使用OpenCV进行视频捕获和显示?
cv::VideoCapture cap;
image_window output_frame;
if (!cap.open(0))
{
cout << "ERROR: Opening video device 0 FAILED." << endl;
return -1;
}
cv::Mat cap_frame;
//HWND hwnd;
do
{
cap >> cap_frame;
if (!cap_frame.empty())
{
cv_image<bgr_pixel> dlib_frame(cap_frame);
output_frame.set_image(dlib_frame);
//cv::imshow("output",dlib::toMat(dlib_frame));
}
//if (27 == char(cv::waitKey(10)))
//{
// return 0;
//}
//hwnd = FindWindowA(NULL, "output");
} while(!output_frame.is_closed())//while (hwnd != NULL);
Run Code Online (Sandbox Code Playgroud)
编辑: 切换到释放模式后显示捕获的帧变得正常.但我继续尝试使用dlib进行面部检测和形状预测,就像这里的示例http://dlib.net/face_landmark_detection_ex.cpp.html一样.这是相当迟钝的.所以我关闭了形状预测.仍然"滞后.
所以我假设面部检测正在减慢速度.所以我尝试使用OpenCV进行面部检测, …
当我在我的解决方案中运行所有测试(大约800个测试)时,一段时间后会显示一个错误的弹出窗口,表明vstest.executionengine.x86.exe已停止工作.
我得到的一些问题细节示例如下:
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: vstest.executionengine.x86.exe
Problem Signature 02: 14.0.23107.0
Problem Signature 03: 559b7b6c
Problem Signature 04: mscorlib
Problem Signature 05: 4.6.1076.0
Problem Signature 06: 56d79fa2
Problem Signature 07: 0
Problem Signature 08: ffffffff
Problem Signature 09: System.StackOverflowException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1051
Additional Information 1: 5cd2
Additional Information 2: 5cd2742c12da7dd4b1d5bf900186a452
Additional Information 3: 2fe2
Additional Information 4: 2fe276cacf1c00cd7a2aed7b27f5a5f9
Problem signature:
Problem Event Name: APPCRASH
Application Name: vstest.executionengine.x86.exe
Application Version: 14.0.23107.0
Application Timestamp: …Run Code Online (Sandbox Code Playgroud)