配置编译环境:进sublime,然后点击Tools->Build System->New build System直接用下面的替换{ "shell_cmd": "g++ ‘${file}‘ -o ‘${file_path}/${file_base_name}‘", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "variants": [ { "name": "Build & Run", "shell_cmd": "x-terminal-emulator -e bash -c \"g++ ‘${file}‘ -o ‘${...
配置:Ubuntu 13.04 + Eclipse4.3 + JRE 7 现象:打开一个内嵌AWT/SWING代码的Eclipse 视图,Eclipse直接挂掉 原因:AWT/SWING和SWT都在访问GTK时都使用了锁去保护自己的线程。AWT使用的GTK的锁,但是SWT使用的自己的锁。在使用SWT访问AWT时,就会出错。 解决办法:在使用SWT访问AWT的代码中将以下代码: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 修改为: if (Platform.WS_...
环境准备: 基本环境:ubuntu-14.04-desktop-64bit LTS(裸机或者Windows下虚拟机安装均可,12.04也可以,但10.04目前不支持了) 其他要求:空闲磁盘空间100G以上,代码部分接近10G,其他为git和编译中间和目标文件准备 ========================================== 第一部分:环境初始化 ========================================== 1. 安装Oracle JDK 注意:如果编译Android4.4不能用OpenJDK,必须用Oracle JDK1.6,1.7目前...
参考博客 http://www.xitongzhijia.net/xtjc/20150320/42297.htmlhttp://blog.chinaunix.net/uid-17188120-id-4650534.html1.Ubuntu下安装GitUbuntu14.04 LTS默认是已经安装Git的,可以使用 git –version 测试是否安装。 如果没有安装,使用命令: sudo apt-get install git git-core 安装git2.ssh认证在Ubuntu下使用ssh命令连接github.com的SSH服务,登录名为git@github.com(所有GitHub用户共享此SSH用户名)。ssh -T git@github...
默认在Ubuntu下使用Vim写代码交互感不是特别好,尤其是习惯了Window 下各种IDE的格式自动补全功能,其实Vim也可以做到,具体实现方法如下。1. 在终端输入:vim vim/etc/vim/vimrc 2. 在文件末添加:inoremap{ {<ENTER>}<UP><RIGHT><ENTER> 3. 保存退出,重新打开要编辑的文件测试如下,输入 ‘{‘ 后可以看到vim帮我们自动换行和补全中括号,并自动缩进 原文:https://www.cnblogs.com/DPShadow/p/13284347.html
本文首发于个人博客https://kezunlin.me/post/e88f04e5/,欢迎阅读最新内容!pymongo and mongoengine tutorial on ubuntu 16.04Guideversionmongo 2.6.10mongo gui: robo3t-1.3.1pymongo 3.9.0MongoEngine 0.18.2install mongodbsudo apt-get install -y mongodbmongo shellmongo --host mongodb0.example.com --port 27017mongo --version MongoDB shell version: 2.6.10see mongo shell> mongo # show all dbs > show dbs# dis...
Ubuntu配置Git并利用Gitee(码云)进行项目及代码的管理 git安装与卸载 apt-get install git apt-get remove gitgit配置 配置用户名 git config --global user.name “your name”配置邮箱 git config --global user.email “your email”查看配置信息 git config --global --list生成公钥 ssh-keygen -t rsa -C "your email"生成公钥后在ssh相应目录中将id_rsa.pub中的内容拷贝至码云测试配置是否成功 ssh -T git@gitee.comgit提交...
我花了很多时间在运行Ubuntu Linux(11.04)的机器上设置CUDA工具链.该装备有两个NVIDIA Tesla GPU,我可以从NVIDIA GPU计算SDK编译和运行测试程序,如deviceQuery,deviceQueryDrv和bandwidthTest. 当我尝试从书籍和在线资源中编译基本样本程序时,我的问题出现了.我知道你应该用NVCC编译,但每当我使用它时我都会遇到编译错误.基本上任何涉及CUDA库的include语句都会丢失文件/库错误.一个例子是:#include <cutil.h>我是否需要某种makef...
http://www.gxlcms.com/php/php-tp-inst安装PHP7.0sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install -y php7.0 sudo apt-get install php7.0 php7.0-dev php7.0-mysql php7.0-curl php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-intl php7.0-json php7.0-memcached php7.0-mysqlnd php7.0-readline php7.0-zip 已经安装过得PHP升级到php7.0sudo add-ap...
下载httpd-2.2.26.tar.gz(下载地址),执行sudo tar xzfv httpd-2.2.26.tar.gz cd httpd-2.2.26 sudo ./configure --prefix=/usr/local/apache2 --enable-module=most --enable-rewrite --enable-shared=max --enable-so如果提示如下错误:checking for C compiler default output file name... configure: error: C compiler cannot create executables原因是未安装libc6-dev ,执行sudo apt-get install build-essential就ok了...
代码如下:/* * 生成ubuntu自动切换壁纸xml文件 */ //图片目录 $dir = '/home/yuxing/background'; $hd = opendir($dir) or die('can not open dir'); $files = array(); while($file = readdir($hd)) { $tem = "$dir/$file"; if (is_file($tem) && in_array(strtolower(substr(strrchr($file,'.'), 1)), array('jpg', 'gif'))) $files[] = $tem; } closedir($hd); unset($file); $xw = new xmlWriter(); $xw->openMemory(); $xw->s...
代码如下:/* * 生成ubuntu自动切换壁纸xml文件 */ //图片目录 $dir = '/home/yuxing/background'; $hd = opendir($dir) or die('can not open dir'); $files = array(); while($file = readdir($hd)) { $tem = "$dir/$file"; if (is_file($tem) && in_array(strtolower(substr(strrchr($file,'.'), 1)), array('jpg', 'gif'))) $files[] = $tem; } closedir($hd); unset($file); $xw = new xmlWriter(); $xw->openMemory(); $xw->s...
我是按照http://blog.sina.com.cn/s/blog_568f35c701016tzb.html上的方法安装的LAMP,然后又按照http://dsec.pku.edu.cn/~lyj/Programming/configure_php.html上说的修改了一下 这个是转换视频的php代码,test.avi放在主文件夹目录里,直接用终端输ffmpeg -i test.avi outtest.asf能正常转换格式 $cmd="ffmpeg -i test.avi outtest.asf"; exec($cmd,$out,$status); print_r($out); print_r($status);//0是成功 1是失败 ...
Ubuntu下使用crontab执行php代码wangking写道 在网站开发中难免会遇到定时执行php代码,php不像java那样有定时器,所以只能用crontab来替代。? ? 编辑crontab文件可以看到具体书写规范,很方便(vim /etc/crontab):? ? ?如下为书写规范: # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --repo...
代码如下:/* * 生成ubuntu自动切换壁纸xml文件 */ //图片目录 $dir = '/home/yuxing/background'; $hd = opendir($dir) or die('can not open dir'); $files = array(); while($file = readdir($hd)) { $tem = "$dir/$file"; if (is_file($tem) && in_array(strtolower(substr(strrchr($file,'.'), 1)), array('jpg', 'gif'))) $files[] = $tem; } closedir($hd); unset($file); $xw = new xmlWriter(); $xw->openMemory(); $xw->s...