文章分类 -  Linux

上一页 1 ··· 16 17 18 19 20
摘要:dbus-glib是dbus底层接口的一个封装。本讲我们用dbus-glib做一个dus接口,并写一个客户程序。1、接口1.1、编写接口描述文件首先编写接口描述文件。我们要实现的连接的公共名是"org.freesmartphone.ogsmd",接口描述文件如下:$ cat smss.xml <?xml version="1.0" encoding="UTF-8" ?> <node name="/org/freesmartphone/GSM/Device"> <interface na 阅读全文
posted @ 2011-11-23 14:51 alxe_yu 阅读(795) 评论(0) 推荐(0) 编辑
摘要:definition:structGList{gpointerdata; GList*next; GList*prev;};/**file:g_list.c*desc:这个文件用于演示glib库里双向链表GList的用法*compile:gcc-og_listg_list.c`pkg-config--cflags--libsglib-2.0`*/#include<glib.h>voiddisplay_list(GList*list){GList*it=NULL;/*遍历链表*/for(it=list;it;it=it->next){printf("%s", 阅读全文
posted @ 2011-11-23 14:50 alxe_yu 阅读(891) 评论(0) 推荐(0) 编辑
摘要:open database:sqlite3 <file of database, for example, xx.db>遇有未知结构的数据库时,可以通过以下方法来或许数据库中详细信息。1. .table命令 可以查询当前数据库中所有的表名2. select * from sqlite_master WHERE type = "table"; 可以查询到当前数据库中所有表的详细结构信息[test@localhost ~]$ sqlite3 py.dbSQLite version 3.6.17Enter ".help" for instructi 阅读全文
posted @ 2011-09-02 13:54 alxe_yu 阅读(237) 评论(0) 推荐(0) 编辑
摘要:1.概念1). 什么是core dumpcore dump即是内存dump(现在通常是写在一个叫core的file 里面),core也许来自远古时候,那时候人们使用线圈制作内存,而线圈就叫做core。2). 什么是map文件MAP 文件是程序的全局符号、源文件和代码行号信息的唯一的文本表示方法,是整个程序工程信息的静态文本,通常由linker生成。注:map文件在各种编译器中都可以使用,不限于gcc.2.使用1). core dump如果用的是bash的话, 在/etc/profile里加上(或者修改)一条: ulimit -c 0则禁止core dump.使用core dump -c 尺寸 阅读全文
posted @ 2011-09-01 10:44 alxe_yu 阅读(900) 评论(0) 推荐(0) 编辑
摘要:1. specify the breakpoint on a specified file and number: 用gdb如何指定某个文件的行号: (gdb) break <path of file>:<LINENUM>2. gdb <executable file> run <test_data_file>3. n/next, c/continue, l/list, p/print4. gdb print <variable>: problem: <value optimized out> disable optimi 阅读全文
posted @ 2011-08-31 16:11 alxe_yu 阅读(783) 评论(0) 推荐(0) 编辑
摘要:Environment: FC12I'm trying to install wireshark or FC5 using yum. I'm simply using: yum install wiresharkIt finds the right package and dependancies, downloads them, and then says install. However, when I try to run the program, just using: wiresharkI get a command not found. I've tried 阅读全文
posted @ 2011-08-31 13:45 alxe_yu 阅读(444) 评论(0) 推荐(0) 编辑
摘要:Today write a python script to sumbit requests via https, python version is 3.2, encountered an error when calling http.client.HTTPSConnection()conn = http.client.HTTPSConnection(ip,443,None) AttributeError: 'module' object has no attribute 'HTTPSConnection'after google it, found tha 阅读全文
posted @ 2011-08-22 14:06 alxe_yu 阅读(915) 评论(0) 推荐(0) 编辑
摘要:转载: http://book.51cto.com/art/200811/96138.htmC程序内存分配第3章 内存管理及相关工具在任何程序设计环境及语言中,内存管理都十分重要。在目前的计算机系统或嵌入式系统中,内存资源仍然是有限的。因此在程序设计中,有效地管理内存资源是程序员首先考虑的问题。第1节主要介绍内存管理基本概念,重点介绍C程序中内存的分配,以及C语言编译后的可执行程序的存储结构和运行... 阅读全文
posted @ 2010-11-10 01:02 alxe_yu 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Configure samba on fedora12First give the quick start:1. Install system-config-samba: yum install system-config-samba2. Enter system-config-samba in terminal, you’d better switch to root user he... 阅读全文
posted @ 2010-10-28 11:36 alxe_yu 阅读(887) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20