判断/home下有没有文件aaa.txt,如果存在则提示错误,如果文件不存在则创建且文件最终权限为644。#include<stdio.h>
#include<fcntl.h>
intmain(void){
intfd;
fd=open("/home/aaa.txt",O_WRONLY|O_CREAT|O_EXCL,0666);
if(fd==-1)
printf("Error:Fileexists.\n");..
分类:
系统相关 时间:
2014-07-29 16:01:59
阅读次数:
328
ActionScript学习笔记ActionScript中预定义的数据类型:Boolean、int、Number、String、uint其中,int、Number、uint是处理数字的。int用来处理整数,Number用来处理很长又有小数点的数字,uint处理很大的正整数。复杂数据类型:Array、Date、Error、Function、RegExp、XML、XM..
分类:
其他好文 时间:
2014-07-29 15:54:19
阅读次数:
311
trunkmergebranch的时候报错xxxmustbeancestrallyrelatedtoxxx,这个报错的意思是两者不关联,所以需要去建立关联。【回顾背景】代码初始是先建立了branch,然后从branchcopytotrunk。这个先后顺序有问题。应该是先建立trunk,再打branch,branch修改之后,再合并到trunk【具体..
分类:
其他好文 时间:
2014-07-29 15:48:09
阅读次数:
240
classerrorObject{public$error;publicfunction__construct($error){$this->error=$error;}publicfunctiongetError(){return$this->error;}}classlogToConsole{private$_errorObject;publicfunction__construct($_errorObject){$this->_errorObject=$_errorObject;}pu..
分类:
其他好文 时间:
2014-07-29 15:47:29
阅读次数:
161
#定义Nginx运行的用户和用户组user www www; #nginx进程数,建议设置为等于CPU总核心数。worker_processes 8; #全局错误日志定义类型,[ debug | info | notice | warn | error | crit ]error_log ar/loginx/error.log info; #进程文件pid ar/runinx.pid; #一个ng...
分类:
其他好文 时间:
2014-07-29 15:00:28
阅读次数:
342
没完没了的弹出,让原本的思路和心情完全打乱,谁能告诉我,它是怎么出现的呢,好奇怪...
分类:
编程语言 时间:
2014-07-29 14:45:58
阅读次数:
242
使用Keil开发环境对STM32L Discovery进行开发,更新一次firmware后就不能连接目标板了,报错Internal command error Flash download failed target dll has been can。最后将Keil更新至4.60就可了。使用过程中,...
分类:
其他好文 时间:
2014-07-29 14:03:38
阅读次数:
331
在上篇表单验证中,过程中可谓坎坷,记录一下错误问题及解决方案。我们用到的模板contact_form.html如下,其他urls.py自行去修改。 Contact us Contact us {% if errors %} {% for error in er...
分类:
其他好文 时间:
2014-07-29 13:59:38
阅读次数:
184
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server ad...
分类:
Web程序 时间:
2014-07-29 13:55:38
阅读次数:
203
git在pull时,出现这种错误的时候,可能很多人进进行stash,相关stash的请看:Error
pulling origin: error: Your local changes to the following files would be overwritten by merge
但是发现stash后还是会出现:Error
pulling origin: error: The ...