易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

Veritas Linux Cluster

Get Redhat Enterprise 3.0 from:
Your local RedHat rep�
Get Veritas’ VCS and VM products from:
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2.redhatlinux.tar.gz
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2MP1.redhatlinux.tar.gz
You will need a temporary key to complete this install. Please
contact your local Veritas account team or email me at
rich@robotthoughts.com
Install RedHat Enterprise Linux 3.0:
Put CD1 in your CD drive and reboot.
Make sure you select the smb-server packages during the install. You need that package to run Samba for Windows file-sharing.
Follow the install for your hardware and set up the boot disk to
your liking. Be sure and leave some extra room on the disk (a least an
extra 2-5 Gb) if you plan to encapsulate the boot volume.
Pay attention to how you setup the Ethernet cards. In Linux your
cards will most likely be eth0, eth1, eth2. In my case I had two
on-board Ethernet ports and one PCI based Ethernet card. Most Linux
i ......

linux 下 用c语言创建mysql数据库笔记(一)

linux 下 用c语言创建mysql数据库笔记(一)
     
-----仅为个人学习摘要,并不断更新中。。。。
在引用头文件时必须包含‘mysql.h’的头文件(必须是mysql.h的绝对地址,一般在mysql下的include目录下,仔细看看你的在哪里?*),
我是ubuntu9。04,在/usr/include/mysql/mysql.h下
有的linux版本可能在/usr/local/mysql/include/mysql/mysql.h下。
---- 对其中几个函数作简单说明,详细说明,可参考MySQL文档:
---- 1. MYSQL *mysql_init(MYSQL *mysql)
---- 初始化一个类型为MYSQL的数据结构,为执行mysql_real_connect()做准备。参数
mysql为指向该结构的指针,如果mysql为NULL,则新建并初始化一个MYSQL的数据结构。
新建的结构将在mysql_close()中释放。
---- 若成功,返回初始化的MYSQL数据结构的指针,否则返回NULL。
---- 2. MYSQL *mysql_real_connect(MYSQL *mysql, const char
*host,
---- const char *user, const char *passwd, const char *db,
---- unsigned int port, const char *unix_socket, unsigned int
client_flag)
---- 与MySQL数据库引擎建立连接。在执行进一步的数据操作之前,必须保证m ......

linux 下 用c语言创建mysql数据库笔记(一)

linux 下 用c语言创建mysql数据库笔记(一)
     
-----仅为个人学习摘要,并不断更新中。。。。
在引用头文件时必须包含‘mysql.h’的头文件(必须是mysql.h的绝对地址,一般在mysql下的include目录下,仔细看看你的在哪里?*),
我是ubuntu9。04,在/usr/include/mysql/mysql.h下
有的linux版本可能在/usr/local/mysql/include/mysql/mysql.h下。
---- 对其中几个函数作简单说明,详细说明,可参考MySQL文档:
---- 1. MYSQL *mysql_init(MYSQL *mysql)
---- 初始化一个类型为MYSQL的数据结构,为执行mysql_real_connect()做准备。参数
mysql为指向该结构的指针,如果mysql为NULL,则新建并初始化一个MYSQL的数据结构。
新建的结构将在mysql_close()中释放。
---- 若成功,返回初始化的MYSQL数据结构的指针,否则返回NULL。
---- 2. MYSQL *mysql_real_connect(MYSQL *mysql, const char
*host,
---- const char *user, const char *passwd, const char *db,
---- unsigned int port, const char *unix_socket, unsigned int
client_flag)
---- 与MySQL数据库引擎建立连接。在执行进一步的数据操作之前,必须保证m ......

linux 下 用c语言创建mysql数据库笔记(一)

linux 下 用c语言创建mysql数据库笔记(一)
     
-----仅为个人学习摘要,并不断更新中。。。。
在引用头文件时必须包含‘mysql.h’的头文件(必须是mysql.h的绝对地址,一般在mysql下的include目录下,仔细看看你的在哪里?*),
我是ubuntu9。04,在/usr/include/mysql/mysql.h下
有的linux版本可能在/usr/local/mysql/include/mysql/mysql.h下。
---- 对其中几个函数作简单说明,详细说明,可参考MySQL文档:
---- 1. MYSQL *mysql_init(MYSQL *mysql)
---- 初始化一个类型为MYSQL的数据结构,为执行mysql_real_connect()做准备。参数
mysql为指向该结构的指针,如果mysql为NULL,则新建并初始化一个MYSQL的数据结构。
新建的结构将在mysql_close()中释放。
---- 若成功,返回初始化的MYSQL数据结构的指针,否则返回NULL。
---- 2. MYSQL *mysql_real_connect(MYSQL *mysql, const char
*host,
---- const char *user, const char *passwd, const char *db,
---- unsigned int port, const char *unix_socket, unsigned int
client_flag)
---- 与MySQL数据库引擎建立连接。在执行进一步的数据操作之前,必须保证m ......

linux 下 用c语言创建mysql数据库笔记(二)

linux 下 用c语言创建mysql数据库笔记(二)
                       
-------两个简单的例子,供参考比较
《例一》
#include <stdio.h>
#include <stdlib.h>
#include
"/usr/include/mysql/mysql.h"      
int main(){
MYSQL my_connection;
int res;
mysql_init(&my_connection);
if(mysql_real_connect(&my_connection,"localhost","root","123","data",0,NULL,CLIENT_FOUND_ROWS)){
printf("connection success\n");
res= mysql_query(&my_connection,"select * from
ip");
  if(!res){
     
printf("%lu",(unsigned
long)mysql_affected_rows(&my_connection));
}
  else{
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
 
mys ......

linux 下 用c语言创建mysql数据库笔记(二)

linux 下 用c语言创建mysql数据库笔记(二)
                       
-------两个简单的例子,供参考比较
《例一》
#include <stdio.h>
#include <stdlib.h>
#include
"/usr/include/mysql/mysql.h"      
int main(){
MYSQL my_connection;
int res;
mysql_init(&my_connection);
if(mysql_real_connect(&my_connection,"localhost","root","123","data",0,NULL,CLIENT_FOUND_ROWS)){
printf("connection success\n");
res= mysql_query(&my_connection,"select * from
ip");
  if(!res){
     
printf("%lu",(unsigned
long)mysql_affected_rows(&my_connection));
}
  else{
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
 
mys ......

linux 下 用c语言创建mysql数据库笔记(二)

linux 下 用c语言创建mysql数据库笔记(二)
                       
-------两个简单的例子,供参考比较
《例一》
#include <stdio.h>
#include <stdlib.h>
#include
"/usr/include/mysql/mysql.h"      
int main(){
MYSQL my_connection;
int res;
mysql_init(&my_connection);
if(mysql_real_connect(&my_connection,"localhost","root","123","data",0,NULL,CLIENT_FOUND_ROWS)){
printf("connection success\n");
res= mysql_query(&my_connection,"select * from
ip");
  if(!res){
     
printf("%lu",(unsigned
long)mysql_affected_rows(&my_connection));
}
  else{
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
 
mys ......

Linux Kernel kbuild 系统

原文链接:
http://blog.chinaunix.net/u3/94283
     从以上例子中可以看到,内核的编译系统kbuild是个很庞大的系统。但是,它所使用的make和我们平时用的make是一模一样的。kbuild只是通
过预定义一些变量(obj-m,obj-y等等)和目标(bzImage
,menuconfig等等),使内核的编译和扩展变得十分方便。我们不妨yy一下kbuild的一些功能:
1.考虑到Linux
能够方便地移植到各个硬件平台,kbuild也必须很容易添加对某个新的平台的支持,同时上层的Makefile不需要做大的改动。
2.Linux下有众多驱动设备。它们的Makefile希望能够尽可能简洁。简洁到只要指定要编译的.o文件就行。(这方面kbuild定义了很多有用
的变量如obj-m obj-y,-objs等等,用户只要为这些变量赋值,kbuild会自动把代码编译到内核或者编译成模块)
3.要有方便的可定制性。很多参数可以让用户指定。这方面kbuild也提供了大量的变量如EXTRA_CFLAGS,用户如果想include自己的头文件或者加其它编译参数,只要设置一下EXTRA_CFLAGS就可以。
4.有能力递归地调用Makefile。因为内核是一个庞大的软件。它的源代码的目录层次很深。要提供一种简洁的机制,使上层的Makefile能方便地调用下层的Make ......

Linux中tty pty pts 概念区别

本文摘自 http://hi.baidu.com/yuhongchun027/blog/item/2ac559517ec1f5898c543002.html
Linux中tty pty pts 概念区别
基本概念:
1> tty(终端设备的统称):
tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被键盘与显示器取代,所以现在叫终端比较合适。
终端是一种字符型设备,它有多种类型,通常使用tty来简称各种类型的终端设备。
2> pty(虚拟终端):
但是如果我们远程telnet到主机或使用xterm时不也需要一个终端交互么?是的,这就是虚拟终端pty(pseudo-tty)
3> pts/ptmx(pts/ptmx结合使用,进而实现pty):
pts(pseudo-terminal slave)是pty的实现方法,与ptmx(pseudo-terminal master)配合使用实现pty。
Linux终端:
在Linux系统的设备特殊文件目录/dev/下,终端特殊设备文件一般有以下几种:
1、串行端口终端(/dev/ttySn)
串行端口终端(Serial Port Terminal)是使用计算机串行端口连接的终端设备。计算机把每个串行端口都看作是一个字符设备。有段时间这些串行端口设备通常被称为终端设备,因为那时它的最大用途就是用来连接终端。这些串行端口所对应的设备名称 ......

Linux下把kernel空间映射到用户进程空间(mmap实现)

 在mmap函数里,使用remap_pfn_range
函数。代码如下。注意要设置一下vma->vm_pgoff为你要map的io空间的物理地址对应的页。
arm  IO/ 内存统一编址  所以
#define io_remap_pfn_range(vma,from,pfn,size,prot) \
                remap_pfn_range(vma, from, pfn, size, prot)
vm_start, vm_end  在系统调用时算好了,应该时找个空闲得空间,然后根据size算出vm_end,
static int filter_mmap(struct file *filp, struct vm_area_struct *vma)
{
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
vma->vm_pgoff = ( (u32)map_start >> PAGE_SHIFT);
if (remap_pfn_range
(vma,
vma->vm_start,
vma->vm_pgoff,
vma->vm_end-vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;
return 0;
}
map 过程 :
用户空间map(start,offset, len , fd ,...)   start 映射到的用户空间地址,0就是自己去找吧,offset 文件的偏移。 
old_mmap(struct mmap_arg_struct __user *arg) & ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [6123] [6124] [6125] [6126] 6127 [6128] [6129] [6130] [6131] [6132]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号