`
文章列表
本节主要参考:    曹乐的《在Emacs下用C/C++编程》    王纯业的《Emacs 一个强大的平台》    emacswiki.orgemcas难学易用,可扩展性强。有人把她当作信仰,有人认为他是魔鬼!学习首先记住基本的键盘快捷键,学会常用插件,深入学习还需学习lisp语言。本节紧对emacs作为开发环境做一个基本的介绍。基本安装设置请参考:Ubuntu Ubuntu 8.04 LTS 配置笔记emacs的基本安装设置完成后,使emacs成为C开发环境还需做如下设置,新建$HOME/.emacs文件 vim $HOME/.emacs 本文把emacs插件放在 $HOME/.emacs.d ...
sudo 用来执行命令行(CLI)程序 gksu 用来执行图形的(GUI)程序   GUI = Graphical User Interface CLI = Command Line Interface   sudo 是当前用户的home目录,gksu 是root 用户的home目录 sudo gvim 和 gksu gvim 明显不同, sudo gvim 读取当前用户下的 ~/.gvim 配置文件, gksu 读取 root 用户的配置文件,因为当前用户配置文件里设置字体没起作用,:cd 后 :pwd 结果是 /root   所以在系统或程序启动时,没有运行终端CLI,可以用gksu来实 ...
现在Ubuntu网站已经停止维护Feisty 7.04这个版本。所以想要安装这个版本的包的话,需要修改更新服务器 (编辑 /etc/apt/sources.list):用old-releases.ubuntu.com替换 security.ubuntu.com 等无法连接(失效)的网址  
在C或C++中常有一些程序,结尾有不影响运行的 return 1或 return 0 .它们有什么作用?   return 0是正常退出,return 非零 是异常退出,这是返回给控制台的,不在你编的程序的控制范围内,是给操作系统识别的,对你的程序无影响。如果是C中,定义void main()可以不用返回值。具体操作系统怎么处理0和非零我也不知道,也没必要了解,因为与你的程序无关。   void 指的是无类型的数字,挺起来很费解吧?     在计算机系统中,是按照基本字节来进行处理的,比如char占一个字节, short两个字节,long四个字节,等等,也有编程中处理协议使用的结构stru ...
1.编译与安装程序到节点   引用 $ make mica2 编译mica2 platform     引用 $ make mica2 install 编译并安装 (using the default parallel port programmer) Blink for the mica2     引用 $ make mica2 reinstall mib510,/dev/ttyS0 安装已经编译好的应用,使用 MIB510 serial port programmer connected to serial port /dev/ttyS0.     引用 $ make mica2 rei ...
EOFF 关断能量损耗 用于 device off, stopping 等命令 RSSI 相关资料 In telecommunications, received signal strength indication (RSSI) is a measurement of the power present in a received radio signal.
$ sudo echo 1 > /sys/devices/platform/xxconfig $ bash: /sys/devices/platform/xxconfig: Permission denied 今天被这个问题困扰着。 然后su切换到root就没有问题 $ su Password: (你的用户密码) $ sudo echo 1 > /sys/devices/platform/xxconfig 或者使用sudo -sH $ sudo -sH echo 1 > /sys/devices/platform/xxconfig 这是因为转向对file进行操作时, ...
GNU C的一大特色(却不被初学者所知)就是__attribute__机制。__attribute__可以设置函数属性(Function Attribute)、变量属性(Variable Attribute)和类型属性(Type Attribute)。          __attribute__书写特征是:__attribute__前后都有两 ...
不能上网通过apt-get install下载包的话,只能手动下载源码。 下载站点 http://packages.ubuntu.com/ 备选网站(如果官网找不到你要的包) https://launchpad.net/ubuntu linux kernel 下载网站 http://www.kernel.org/
nx_ types 是在nesC 1.2,tinyos中用到的platform independent types. 这个类型的数据可以适用任何平台。 To accomplish this goal, nesC 1.2 introduces platform independent types.(network types) Platform independent simple types (integers) are either big-endian or little-endian, independently of the underlying chip hardware. G ...
Preprocessor: #ifdef and #ifndef The #ifdef (if defined) and #ifndef (if not defined) preprocessor commands are used to test if a preprocessor variable has been "defined". There are two common uses for this, with slightly different patterns. Prevent multiple definitions in header files Whe ...
tp_smapi用于控制电池充电和提供额外的电池信息。   参考页面:http://www.thinkwiki.org/wiki/Tp_smapi#Battery_charge_control_features   Ubuntu集成这个软件自从Hardy以后的版本, 可以直接使用,无需安装。     电池充电控制   设置开始与停止充电的阀值(百分比)   # echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh # echo 70 > /sys/devices/platform/smapi/BAT0/stop ...
ubuntu下   关闭swap sudo swapoff /dev/hdax   启用/关闭 网卡   usage: /etc/init.d/networking {stop|start|restart}  重启网卡 /etc/init.d/networking restart   启用/关闭 无线网卡   sudo iwconfig wlan0 power on  sudo iwconfig wlan0 power off   检查电池信息 /proc/acpi/battery/ 比如info文件内容 present:yes de ...
<>先去系统目录中找头文件,如果没有在到当前目录下找。所以像标准的头文件 stdio.h、stdlib.h等用这个方法。 而""首先在当前目录下寻找,如果找不到,再到系统目录中寻找。 这个用于include自定义的头文件,让系统优先使用当前目录中定义的。 When writing your C program, you can include files in two ways. The first way is to surround the file you want to include with the angled brackets < ...
动态源路由协议(Dynamic Source Routing, DSR)是在移动自组网(MANET)中使用的一种路由协议。它工作在TCP/IP协议族的网际层。    它的首部采用扩展性良好的TLV格式。除固定部分外,不同类型的选项(option)以TLV格式附加在固定部分之后。    选项的种类包括:   路由请求(Route Request)   路由应答(Route Reply)   确认请求(ACK Request)   确认(ACK)   源路由(Source Route)     Dynamic source routing protocol (DSR) is an on-demand ...
Global site tag (gtag.js) - Google Analytics