Linux fopen函数 stat函数
1.
今天上班追了个问题,追了半天发现是fopen打开大于2G的文件有问题。
马上Google下,做个笔记:
// 定义宏,使得可以处理大文件(>4GB)
#undef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#include <unistd.h>
#include <dirent.h>
fopen64()
2.
函数:perror
NAME
perror - print a system error message
SYNOPSIS
#include <stdio.h>
void perror(const char *s);
#include <errno.h>
const char *sys_errlist[];
int sys_nerr;
int errno;
相关文档:
1.管道
1.1普通管道
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
int main()
{
int pipe_fd[2];
pid_t pid;
  ......
第一章
1.
解释性语言:shell javascript python 编程人员不需要经过编译 连接的过程,可以在特定环境下直接执行的语言 自动编译连接。开发效率高,但运行效率低。
编译型语言:java c c++,需要经过编程人员经过编译和连接产生可执行程序的语言。运行效率高。
2.
数据
数据结构:数据之间的 ......
转贴自: http://hi.baidu.com/harrybobo/blog/item/ae3347b51711afc637d3ca69.html
一、为什么要使用库文件
我们在实际编程工作中肯定会遇到这种情况:有几个项目里有一些函数模块的功能相同,
实现代码也相同,也是我们所说的重复代码。比如,很多项目里都有一个用户验证的功能。
代码段如下:
//UserLogin.h文件,提 ......
作者:Sam(甄峰) sam_cdoe@hotmail.com
1.创建thread.
int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr,
void *(*start_routine)(void*), void *restrict arg);
参数1:pthread_t *restrict t ......
今天在数据库中插入了中文,发现有的是乱码,有的不是,很是纳闷。
最后找到了解决办法:
打开 /etc/mysql/my.cnf
在[mysqld]和[client]节下分别添加:
default-character-set = utf8
然后重新启动mysql,需要注意的是,对修改以前创建的数据库来说,他的字符集还是原来的,所以还是会出现乱马,而新创建的数据 ......