2012年3月31日

vim 去掉自动注释和自动回车

摘要: 经常 putty 到 服务器的 vim 粘贴一段小代码进去如Ruby代码#aaa#bbclassBook#zzzend结果成了这样Ruby代码#aaa##bb#classBook##zzz#end##原因是开启了自动注释和自动缩进:set fo-=r:set noautoindent再 Shift + Insert正常了恢复:set fo=r:set autoindent 阅读全文

posted @ 2012-03-31 18:15 Richard.FreeBSD 阅读(776) 评论(0) 推荐(0) 编辑

Emacs 中文手册

摘要: Emacs 中文手册====================================================[符号]--------------------------------------C- 意思是按住 Ctrol 键M- 意指 Meta 键 (键盘上若无Meta 键,则可以ALT 或 ESC 键来取而代之)DEL 意指退格键 (不是 删除(Delete) key)RET 意指回车键SPC 意指空格键ESC 意指Escape键TAB 意指Tab键像 "C-M-" (or "M-C") 这样连在一起的意味着同时按住 Control 和 阅读全文

posted @ 2012-03-31 16:51 Richard.FreeBSD 阅读(748) 评论(0) 推荐(0) 编辑

c mysql

摘要: mysql>describeusername;+----------+-------------+------+-----+---------+-------+|Field|Type|Null|Key|Default|Extra|+----------+-------------+------+-----+---------+-------+|id|int(10)|YES||NULL|||username|varchar(32)||PRI|||+----------+-------------+------+-----+---------+-------+mysql>;select 阅读全文

posted @ 2012-03-31 16:48 Richard.FreeBSD 阅读(141) 评论(0) 推荐(1) 编辑

用C连MYSQL及其简单操作的示例

摘要: 用C连MYSQL及其简单操作的示例1、数据库名:test,表名:PAY(工资表),结构如下:CREATE TABLE PAY ( FNUMBER varchar(6) NOT NULL default '', FNAME varchar(50) default NULL, FSEX varchar(10) NOT NULL default '', FAGE int(3) default NULL, FPAY decimal(7,2) NOT NULL default '0.00', PRIMARY KEY (FNUMBER) ) TYPE=MyI 阅读全文

posted @ 2012-03-31 16:45 Richard.FreeBSD 阅读(178) 评论(0) 推荐(0) 编辑

Linux下C访问MySQL实践

摘要: Linux下C访问MySQL实践一、开发环境操作系统:FC9Mysql:mysql5.0.28(安装FC9时可以选择安装)Mysql工具包:1. mysql-devel-5.0.51a-1.fc9.i386.rpm (开发工具包,必须安装,常用的mysql.h即在该包下);2. mysql-gui-common-5.0r12-8.fc9.i386.rpm(客户端gui常用工具包,如果需要安装mysql administrator则需要先安装此包);3. mysql-administrator-5.0r12-8.fc9.i386.rpm(客户端mysql adimistrator,此包依赖于上包 阅读全文

posted @ 2012-03-31 16:43 Richard.FreeBSD 阅读(264) 评论(0) 推荐(0) 编辑

Technical Introduction to Multicast

摘要: Technical Introduction to MulticastHigh Performance Remoteboot What is TCP/IP Multicast? The TCP/IP BOOT-PROM can understand multicast sends of TFTP data. Multicast is a standard TCP/IP feature which is described in the Internet Request for Comments document RFC1054. Paraphrasing the introduction to 阅读全文

posted @ 2012-03-31 16:39 Richard.FreeBSD 阅读(132) 评论(0) 推荐(0) 编辑

Working withWorking with Different Coding Styles

摘要: Working with Different Coding Styles问题最近看代码看得相当的 high,有时候也写上几行,再没有了那种不能写代码的郁闷。工作中当然还是没有多少 coding 的机会,不过我现在能挤出时间,尽量增加跟代码的接触 (感谢开明的老板),所以工作心情好多了。这里记录此过程中一个非技术的小问题。 因为接触了好几个开源项目 (Expand Your Bandwidth), 而每个都有不同的代码风格,导致我写代码的时候有点不方便。如何缩进 (或者说 tab 键的处理) 是主要的问题,有的用 4 个空格缩进 (比如多数的 python 代码), 有的用 8 个空格 (比如. 阅读全文

posted @ 2012-03-31 16:38 Richard.FreeBSD 阅读(167) 评论(0) 推荐(0) 编辑

MySQL C API programming tutorial

摘要: MySQL C API programming tutorialAbout this tutorialThis is a C programming tutorial for the MySQL database. It covers the basics of MySQL programming with the C API. You may also consider to look at the MySQL tutorial on ZetCode.About MySQL databaseMySQL is a leading open source database management 阅读全文

posted @ 2012-03-31 16:35 Richard.FreeBSD 阅读(467) 评论(0) 推荐(0) 编辑

dotemacs

摘要: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Filename: .emacs;; ;; Copyright (C) 2010, admirestator;; Version: 20110906;; Author: admirestator <admirestator#gmail.com>;; Created at: Mon Jun 21 15:56:07 2010;; ;; Description: 将此文件重命名为".emacs",并在用户家;; 目录即可。; 阅读全文

posted @ 2012-03-31 16:31 Richard.FreeBSD 阅读(129) 评论(0) 推荐(0) 编辑

Linux kernel coding style

摘要: Linux kernel coding styleThis is a short document describing the preferred coding style for thelinux kernel. Coding style is very personal, and I won't _force_ myviews on anybody, but this is what goes for anything that I have to beable to maintain, and I'd prefer it for most other things to 阅读全文

posted @ 2012-03-31 16:11 Richard.FreeBSD 阅读(278) 评论(0) 推荐(0) 编辑

Linux kernel coding style 1

摘要: Linux kernel coding style This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won't _force_ my views on anybody, but this is what goes for anything that I have to be able to ... 阅读全文

posted @ 2012-03-31 16:10 Richard.FreeBSD 阅读(168) 评论(0) 推荐(0) 编辑

What are pid and lock files for?

摘要: ClassDaemons::PidFileIn: lib/daemons/pidfile.rb Parent: Pid What is a Pid-File?A Pid-File is a file containing the process identification number (pid) that is stored in a well-defined location of the filesystem thus allowing other programs to find out the pid of a running script.Daemons needs the pi 阅读全文

posted @ 2012-03-31 15:02 Richard.FreeBSD 阅读(266) 评论(0) 推荐(0) 编辑

Ubuntu下MySql和C连接的一些问题[转]

摘要: 第一,安装MySql:1、sudo apt-get intsall mysql-server 2、sudo apt-get install mysql-client 3、判断是否安装成功: sudo netstat -tap | grep mysql 如果安装成功会出现现面的提示: tcp 0 0 localhost.localdomain:mysql *:* LISTEN 如果没有成功,重新启动MySql:sudo /etc/init.d/mysql restart 4、直接在中断下面进入MySql:sudo mysql -u root -p 第二:安装要和C 语言连接是的MySql的库文. 阅读全文

posted @ 2012-03-31 09:34 Richard.FreeBSD 阅读(362) 评论(0) 推荐(0) 编辑

LazyCatDepend.el [都是转的]

摘要: http://www.bookshelf.jp/elc/color-moccur.elhttp://www.bookshelf.jp/elc/moccur-edit.el一个是多文件查找,一个是多文件替换。效果如下图:在你的.EMACS中添加(require 'moccur-edit)执行 moccur-grep先输入目录,然后再输入查找的字符(支持中文)回车,OK.还有一个moccur-grep-find 该命令支持子目录查询。posted @ 2011-02-14 21:45 红烧土豆 阅读(121) 评论(0) 编辑搜集的扩展加载;;; 搜集的扩展加载(require ' 阅读全文

posted @ 2012-03-31 09:33 Richard.FreeBSD 阅读(511) 评论(0) 推荐(0) 编辑

In Emacs, what is byte-compilation?

摘要: CByte-compilation is a function of Emacs that transforms Lisp into byte-code. Byte-code, run by an interpreter in Emacs, can be executed more quickly than Lisp. However, because it isn't written in machine code, it can be directly transferred between machines without having to be recompiled. Fun 阅读全文

posted @ 2012-03-31 09:21 Richard.FreeBSD 阅读(286) 评论(0) 推荐(0) 编辑

导航