[mcj]../modules/highgui/src/window_gtk.cpp:48:21: fatal error: gtk/gtk.h:没有那个文件或目录
还是opencv安装问题:
1 2 3 4 5 6 |
/home/mcj/bigdisk/opencv-3.4.5/modules/highgui/src/window_gtk.cpp:48:21: fatal error: gtk/gtk.h: 没有那个文件或目录 compilation terminated. modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:110: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_gtk.cpp.o' failed make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_gtk.cpp.o] Error 1 CMakeFiles/Makefile2:8648: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 |
解决方法:
1 |
sudo apt-get install libgtk2.0-dev |
本文最后更新于2020年3月14日,已超过 1 年没有 […]
[论文]CS/CV方向计算机视觉论文最新预览共计46篇!
关于cs.CV 方向,共计46篇。 [检测分类相关]: 【1】 Part-A^2 Net: 3D Part-Aware and Aggregation Neural Network for Object Detection from Poi […]
[mcj]Session.connect: java.io.IOException: End of IO Stream Read
考虑ssh权限的问题,打开/etc/ssh,然后将所有文件设为600,问题解决。 本文最后更新于2019年7月10日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
[mcj]-bash: /etc/profile: Permission denied
拿一台Ubuntu做测试的时候,连接不上ssh,提示:
1 2 3 4 |
连接成功 -bash: /etc/profile: Permission denied I have no name!@zl:~$ 连接断开 |
即总是先连上再断开。分析一下,是权限的问题。用root没问题,但是非root用户由于没有权限打开/etc,所以没法列出 […]
[mcj]WordPress增加自动发表微博头条
上代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
/** * WordPress 同步文章到新浪微博头条文章 By 无主题博客 * 完善修正 By 祭夜 * 修正内容: * 1.部分代码错误 * 2.修复同步到头条文章时HTML代码被去掉的问题 * 3.增加头条文章封面 * 4.添加博客文章的标签关联到新浪话题 * 原文地址: http://wuzhuti.cn/2715.html(原站已停运) */ function post_to_sina_weibo_toutiao($post_ID) { //ini_set('display_errors', true); if(wp_is_post_revision($post_ID)) return; //修订版本(更新)不发微博 $get_post_info = get_post($post_ID); $get_post_centent = get_post($post_ID)->post_content; $get_post_title = get_post($post_ID)->post_title; if ($get_post_info->post_status == 'publish' && $_POST['original_post_status'] != 'publish') { $appkey='1484874782'; /* 此处是你的新浪微博appkey,不修改的话就会显示来自张戈博客哦! */ $username='XXX'; $userpassword='XXX'; $request = new WP_Http; /* 获取文章标签关键词*/ $tags = wp_get_post_tags($post_ID); foreach ($tags as $tag ) { $keywords = $keywords.'#'.$tag->name."#"; } $status = '【' . strip_tags($get_post_title) . '】 ' . mb_strimwidth(strip_tags(apply_filters('the_content', $get_post_centent)) , 0, 132, ' '); $api_url = 'https://api.weibo.com/proxy/article/publish.json'; $body = array( 'title' => strip_tags($get_post_title), //头条的标题 'content' => get_post($post_ID)->post_content.' 原文地址:' . get_permalink($post_ID), //头条的正文 'cover' => mmimg($post_ID), //头条的封面 'summary' => mb_strimwidth(strip_tags(apply_filters('the_content', $get_post_centent)) , 0, 110, '...'), //头条的导语 'text' => mb_strimwidth(strip_tags(apply_filters('the_content', $get_post_centent)) , 0, 110, $status).$keywords.'原文地址:' . get_permalink($post_ID), //微博的内容 'source' => $appkey ); $headers = array('Authorization' => 'Basic ' . base64_encode("$username:$userpassword")); $result = $request->post($api_url, array('body' => $body,'headers' => $headers)); logInfo($result['body']); } } add_action('publish_post', 'post_to_sina_weibo_toutiao', 0); //给发布文章增加一个分享微博头条文章的动作 //获取封面 function catch_that_image($postID){ $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=\"?(.+\.(jpg|gif|bmp|bnp|png))\"?.+>/i',get_post($postID)->post_content,$matches); $first_img = $matches[1][0]; //将文章第一张图片的地址赋值给$first_img if(empty($first_img)){ //文章第一张图为空,也就是整篇文章没有图片,将默认设置的图片的地址赋值给$first_img $popimg = git_get_option('git_sina_weibo_cover'); $first_img = $popimg; } return $first_img; } function mmimg($postID){ $cti = catch_that_image($postID); //得到$first_img的值,并赋值给$cti $showimg = $cti; //将$cti的值赋值给$showimg has_post_thumbnail(); if(has_post_thumbnail()){ //判断是否有特色图片,有则将$showimg的值替换为特色图片的地址,否则不变 $thumbnail_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'thumbnail'); $shareimg = $thumbnail_image_url[0]; } else{ $shareimg = $showimg; } ; return $shareimg; } //调用代码:mmimg($post_ID) |
本文最后更新于2019年7月8日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
[mcj]WordPress增加美化友情链接页面
点击查看效果: 友情链接 新建一个页面文件,填入: 本文隐藏内容 登陆 后才可以浏览 效果如下: 本文最后更新于2019年8月27日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
[mcj]Dux大前端主题增加网站顶端公告模块
本文主要参考初缘小站和文字咖两位站长的文章,对其中失效的地方进行了修改。在此对二位表示感谢! 先看下效果: 1 后台添加公告按钮 首先需要在后台添加公告按钮,如图: 在functions.php同级目录下新建mcj_gonggao.php文 […]
[mcj]WordPress成员增加显示注册日期以及注册IP
WordPress站点开放注册后,流量大了访问量上去后后台就有一堆的用户注册信息,然而WordPress默认的用户管理界面比较简单,不方便管理,有时候还会经常遇到机器人恶意注册等现象,导致网站有一大批僵尸号,一个个找、排除明显不是办法。但是 […]
[mcj]利用Poedit对WordPress英文插件进行汉化
在使用WordPress的时候,为了优化装饰自己的WordPress站点通常需要找相应的插件来完善自己的网站,但是WordPress毕竟是全球都在用的,加上谷歌等一些知名的学习网站被墙,导致一些WordPress插件全是英文的,虽然国内也有 […]
[mcj]Dux主题进行顶部横条美化
效果: 增加方法: 打开main.css,添加;
1 2 3 4 |
/* 顶部边栏加横条美化*/ .header { background: #fff url('https://tva3.sinaimg.com/large/006VCrUsgy1fjmflvz3z7j30ag0040pv.jpg') repeat-x 0 100%; } |
其中: 静态图片 地址: https://tva3.sinaimg.com/large/006VCrUsgy1fjmflvz […]