博客首页
注册
建议与交流
排行榜
加入友情链接
宝宝相册的专门空间
推荐
投诉
搜索:
帮助
好好学习
bilbo.cublog.cn
管理博客
发表文章
留言
收藏夹
· Compiler
· Unix_Linux
博客圈
音乐
相册
文章
· AutoHotKey
· C/C++
· Caml
· Perl
· Tcl & Expect
· 其他编程语言
· Visual Language
· Compiler Engineering
· Embedded System
· FieldBus
· Hardware Desing
· Safety System
· Unix_Linux
· Software Engineering
· GSM/GSM-R
· 技术幽默
· 读书时间
· Good Resource
· 关注社会
· 胡言乱语
首页
关于作者
姓名:你知道 职业:IT 年龄:每年大一岁 位置:地球 个性介绍:挺笨 Email: bilbo0214@163.com
||
<<
>>
||
我的分类
最新照片
上一张
下一张
幻灯片
停止播放
最新文章
·
portable vs. non-portab..
·
Examples for AT command..
·
(转)Net-Google with Act..
·
(转)SML vs. OCaml
·
(转)What Is Systems Eng..
最新留言
·
bilbo0214
一切照旧,谢谢。
·
nmap
好长时间没来你博客了,都..
·
shihongyuan
我们正在做一个安全系统的..
·
xliu
i do all the things real..
·
yyllssm
我感觉你涉及面好广呀,软..
最新评论
·
惭愧,惭愧,总感觉自己什..
·
我也是。。。查了一个晚上..
·
不错啊,下载学习。
·
呵呵,技术都那么强了,还..
·
痛心,地震毁灭了太多的花..
最新收藏
·
Caml语言
·
OCaml China
·
Objective CAML Tutorial
·
Dan Bricklin
·
Pick the Brain
统计信息
·
总访问量:182157
·
文章个数:222
·
评论条数:68
·
留言条数:5
·
网友推荐:
portable vs. non-portable code example
<div class="Section1"> <p class="MsoNormal"><span style="font-family: 宋体;">不可移植的代码例子</span>:</p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <p class="MsoNormal"><span style="color: red;">typedef struct Version {<o:p></o:p></span></p> <p class="MsoNormal"><span style="color: red;"><span style=""> </span>INT16U Ver;<o:p></o:p></span></p> <p class="MsoNormal"><span style="color: red;">} CFGFILEVER;</span></p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <p class="MsoNormal">const INT16U RELEASE_VERSION = 0x8801;</p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <p class="MsoNormal">CFGFILEVER<span style=""> </span>*pCfgVer = NULL;<span style=""> </span>/* pointer to version */</p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <p class="Mso……
查看全文
发表于:2008-07-03 ┆
阅读(19)
┆
评论(0)
Examples for AT commands to mobile phones
//------------------------------------------------------------------------------------------<br>// read some information from the mobile phone <br>//------------------------------------------------------------------------------------------<br><br>//----- get attension<br>at<br>ok<br><br>//----- get signal quality <br>at+csq<br>+CSQ: 31,99<br><br>//----- get battery charge<br>at+cbc<br>+CBC: 0,90<br><br>//----- check if PIN is verified<br>at+cpin?<br>+CPIN: READY<br><br>//----- check network registration<br>at+creg?<br>+CREG: 0,1<br><br>//----- request model identification<br>at+cgmm<br>Nokia 6210<br><br>//----- request model identification<br>at+cgmm<br>SL55<br><br>//----- request international mobile subscriber identity<br>at+cimi<br>262017130021182<br><br>//----- get message format<br>at+cmgf=?<br>+CMGF: (0)<br><br>//----- get phone activity status<br>at+cpas<br>+CPAS: 0<br><br>//------------------------------------------------------------------------------------------<br>// list and……
查看全文
发表于:2008-07-02 ┆
阅读(19)
┆
评论(0)
(转)Net-Google with ActiveState Perl
<h1>Net-Google with ActiveState Perl</h1> <div class="remark">Installation | <a href="http://johnbokma.com/perl/net-google/comments.html">3 comments</a></div> <p class="first"> If you want to use the Google APIs via Perl, a search at CPAN wile lead you to Net-Google. However, this distribution seems not to be available for the Active State version of Perl last time I checked (March, 30th, 2004). </p> <p class="ad"> <em>You want your ad served 320,000 times a month?</em> <a href="http://johnbokma.com/advertise-your-ad-on-this-site.html">Advertise on John Bokma dot com</a> and I make it happen. </p> <p> Luckily, downloading the gzipped tar file and installing it is quite straightforward. But first you need to get a license key from Google. </p> <h2>Getting a Google APIs license key</h2> <p class="first"> A license key is required from Google in order to use the Net-Google modules. Visit the <a href="http://www.google.com/apis/">Google……
查看全文
发表于:2008-07-02 ┆
阅读(22)
┆
评论(0)
(转)SML vs. OCaml
<h1> Standard ML and Objective Caml, Side by Side </h1> <p> This page gives a quick side by side comparison of program fragments in the two ML dialects <a href="http://mitpress.mit.edu/book-home.tcl?isbn=0262631814">Standard ML</a> ('97 revision) and <a href="http://caml.inria.fr/ocaml/htmlman/">Objective Caml</a> (version 3). It is primarily targetted at people who need to convert code between the two dialects. Where suitable we also mention common extensions to SML, or recent extensions of Ocaml. The comparison does not cover features that do not have an appropriate counter part in the sibling dialect (eg. Ocaml's object sublanguage, SML's user-defined operator fixity, or advanced library issues). </p> <p> The first section is an interaction with the respective toplevel system, in order to show the built-in types. The rest just consists of example expressions and definitions. Keywords and other reserved symbols are type-set in <font color="#0000ff">blue</font>.……
查看全文
发表于:2008-07-02 ┆
阅读(21)
┆
评论(0)
(转)What Is Systems Engineering?
<DIV> <TABLE width="100%" border=0> <TBODY> <TR> <TD width="15%"> <P align=center><IMG height=122 alt=Logo src="http://gd.tuwien.ac.at/systeng/bahill/RtoRLogo.gif" width=128 align=left> </P></TD> <TD width="85%"> <H1 align=left>What Is Systems Engineering?<BR>A Consensus of Senior Systems Engineers</H1></TD></TR></TBODY></TABLE> <P>Facilitated by <BR>A. Terry Bahill <BR>Systems and Industrial Engineering <BR>University of Arizona <BR>Tucson, AZ 85721-0020 <BR>terry@sie.arizona.edu <BR><BR>Frank F. Dean <BR>Sandia National Laboratories <BR>Albuquerque, NM 87185 <BR>fdean@ktech.com <P>Copyright © 1994 to 2007 by Terry Bahill and Frank Dean <P>Last changed October 4, 2007. <P> <H2>Abstract</H2>Systems Engineering is an interdisciplinary process that ensures that the customer's needs are satisfied throughout a system's entire life cycle. This process is comprised of the following seven tasks. <OL> <LI><I><STRONG>S</STRONG>tate the problem.</I> Stating the problem is ……
查看全文
发表于:2008-06-13 ┆
阅读(59)
┆
评论(0)
(转)RTL
<DIV> <P align=center><FONT face="Verdana, Arial, Helvetica, sans-serif"><B><FONT size=+2>The Register Transfer Language</FONT></B></FONT></P> <P><FONT face="Verdana, Arial, Helvetica, sans-serif"><B>Why is an intermediate representation necessary?</B><BR>It is of course possible to write a compiler that creates an abstract syntax tree and generates machine code directly from the tree. A compiler like GCC that supports many front- and back-ends would require geometrically many code generators, one for every combination of AST (for each source input langauge) and target machine. When portability and flexibility are paramount, then, it makes sense to translate all ASTs into some intermediate format that can then be used uniformly to generate code for any number of targets.</FONT></P> <P><FONT face="Verdana, Arial, Helvetica, sans-serif">Furthermore, many compiler optimizations are dependent neither on the specifics of a particular abstract syntax nor on a specific type of hardware, bu……
查看全文
发表于:2008-06-11 ┆
阅读(67)
┆
评论(0)
Game of Life 0.1 in Object Caml
<DIV>终于拿OCaml写了一个程序,实现一个叫Game of Life的程序。</DIV> <DIV>关于Game of Life,可以参考下面两篇文章<A href="http://pzy84.blogspot.com/2007/05/game-of-life.html">http://pzy84.blogspot.com/2007/05/game-of-life.html</A>和<A href="http://www.xinside.net/2006/09/game-of-life.html">http://www.xinside.net/2006/09/game-of-life.html</A>,写的都还不错。</DIV> <DIV> </DIV> <DIV>我这个版本就比较初级了,所以叫0.1,主要原因是算法效率很低--O(n^2),也不可以定制--只支持40x40个cell的grid,随机性也不好--随机函数看上去一点儿都不随机。不过好歹是用OCaml写的程序。</DIV> <DIV>下面两张图是运行过程中的截图,每一秒产生一代。</DIV> <DIV> </DIV> <DIV> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/080610121343.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0></DIV></DIV> <DIV> </DIV> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/080610121357.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0>……
查看全文
发表于:2008-06-10 ┆
阅读(83)
┆
评论(1)
(转)OCaml programming best practice
OCaml is a very big and complex language, like C++, and many parts ofit kinda stick out, are experiments that didn't go well, or exist only for backward compatibility.<br><br>If you want to code OCaml, you might find these hints useful.<br><br><ul><br><li>"Exceptions" in OCaml won't give you a backtrace. This is easily one of the top 3 worst things about OCaml. So even in situations when you'd use an exception in Ruby/Python/Java/etc., think whether you can do something else in OCaml.<br><ul><br><li>For handling "can't happen" situations use something like <span style="font-family: monospace;">failwith (sprintf "Internal error: function foo(%d, %s, %s) expects a non-empty list" a b (foo_to_string c))</span>. Because you won't get a backtrace, you should include as much information as possible.</li><br></ul><br></li><br><li>OCaml's standard library is one of its weakest parts. <b>Always</b> use <a href="http://ocaml-lib.sourceforge.net/">extensions to the std library</a>. If you ……
查看全文
发表于:2008-06-08 ┆
阅读(81)
┆
评论(0)
(转)Recursion
<h2>A (hopefully) painless introduction to recursion</h2> How recursion works, and why it's more powerful than regular looping <table style="border-spacing: 1em 0.5em; width: 50em; text-align: left;"><tbody><tr> <td colspan="2"> <a href="http://www.prairienet.org/%7Edsb/recursion.htm#tail">tail-recursive calls (tail recursion)</a> <br><a href="http://www.prairienet.org/%7Edsb/recursion.htm#why">why recursion?</a> <br><a href="http://www.prairienet.org/%7Edsb/recursion.htm#trees">recursing through tree structures</a> <br> <br> </td></tr> <tr> <th> <a name="looping"> looping with recursion </a></th> <td> Although recursion isn't technically required for simple looping, it's surprisingly versatile and ultimately more expressive. We'll discuss recursion in two phases: First a simple problem where you don't really need recursion but it's easy to understand; then a harder problem where recursion works wonders. <p> For the simple problem to get us st……
查看全文
发表于:2008-06-08 ┆
阅读(71)
┆
评论(0)
quicksort in OCaml
(* qsort *)<br><span style="color: rgb(0, 1, 255);">let rec qsort lst = match lst with</span><br style="color: rgb(0, 1, 255);"><span style="color: rgb(0, 1, 255);"> [] -> []</span><br style="color: rgb(0, 1, 255);"><span style="color: rgb(0, 1, 255);"> | x::xs -> qsort (List.filter (fun y -> y <= x) xs) @ [x] @ qsort (List.filter (fun y -> y > x) xs);; </span><br><br>open Format;;<br>open Genlex;;<br><br>let fprint_list pr ppf = function<br> | [] -> fprintf ppf "[]"<br> | x :: xs -><br> let f ppf = List.iter (fun x -> fprintf ppf ";@ %a" pr x) xs in<br> fprintf ppf "@[<1>[%a%t]@]" pr x f;; <br> <br>let lexer = make_lexer ["["; "]"; ";"] ;;<br><br>let rec parse_U = parser<br> | [< 'Kwd ";"; 'Int n; ns = parse_U >] -> n :: ns<br> | [< >] -> []<br> ;;<br><br>let parse_T = parser<br> | [< 'Int n; ns = ……
查看全文
发表于:2008-06-06 ┆
阅读(86)
┆
评论(0)
2008年6月读书
花了将近一个月才基本把《<span style="color: rgb(0, 1, 255);">Exploring Expect</span>》读了一遍,有很多章节因为windows下用不到都是略读。一个程序就能写这么厚一本书,Don Libes也太有才了。<br><br>对OCaml产生了兴趣,开始阅读Michel Mauny写的《<span style="color: rgb(0, 1, 255);">Functional Programming using Caml Light</span>》,虽然只有140页,但读起来感觉比较吃力,很多概念因为受C语言的影响太深,进入到functional programming就很不适应,看来还需要时间。<br><br>6.1的时候骑自行车跑了4家书店(商务印书馆、王府井外文书店、王府井书店、北京图书大厦),最后买了一本<span style="color: rgb(0, 1, 255);">龙书第二版的影印版</span>,不过换来的代价是两个小臂都晒伤了。龙书第二版的英文电子书其实我已经有了,但看电子的太累眼睛,不过说实话,这本书比《Exploring Expect》厚一倍,而且内容比Expect可难多了,慢慢读吧。<br><br>FM103.9现在每天晚上9:30-10:00都播放一段《<span style="color: rgb(0, 1, 255);">射雕英雄传</span>》,正好听听,省得自己看了。<br><br>最近比较迷茫,不知道自己该做点儿什么,上班不用写程序了,反而感……
查看全文
发表于:2008-06-03 ┆
阅读(99)
┆
评论(2)
(转)A Device Driver for W2K Signals
<div style="margin-left: 40px;"><font size="5">A Device Driver for W2K Signals</font> <p> <font size="4">Unix signals provide a simple IPC that is also asynchronous - your signal handler gets invoked when the signal arrives, no matter what your code was in the middle of. Achieving the same effect under Windows 2000 requires a device driver, so that you can make use of asynchronous procedure calls (APCs).</font><br> </p><p> <font face="geneva,arial,helvetica" size="2">By Panagiotis E., <!-- remove http:// substring (if present) from the url --> <a href="http://www.ddj.com/;jsessionid=ZVNGO1O0RCIMUQSNDLRSKH0CJUNN2JVN" target="_blank"> Dr. Dobb's Journal ……
查看全文
发表于:2008-06-03 ┆
阅读(95)
┆
评论(0)
(转)Caml Introduction
<div> <p><img alt="Caml" src="http://archive.camlcity.org/archive/programming/icon-4.gif"><br></p> <p>Caml is a programming language which is very different from other, "classical"<a href="http://archive.camlcity.org/archive/programming/page-1.html#footnote1" name="textnote1"><font color="#0000ff">[1]</font></a> languages. While a program written in a classical languages consists mainly of <b>statements</b>, Caml programs are composed of <b>functions</b>. A statement takes its input values from the environment (such as variables), computes something, and stores the result again in the environment. To achieve more complex behaviour, you can execute one statement after another, or put your statements into loops. Functions are differ from this model, as there is no possibility to store something into the environment. </p> <p><img alt="An example" src="http://archive.camlcity.org/archive/programming/icon-1.gif"><br></p> <p>For example, to determine the biggest number of an array, e……
查看全文
发表于:2008-06-03 ┆
阅读(88)
┆
评论(0)
Hazard Identification Process(笔记)
<DIV>写了一篇关于Hazard identification process论文的阅读笔记,算是总结一下吧,免得以后又忘了。</DIV> <DIV> <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#dddddd cellSpacing=0 cellPadding=0 width=360 align=center border=1> <TBODY> <TR height=60> <TD align=middle width=60><IMG alt="" src="http://control.cublog.cn/fileicon/pdf.gif" border=0></TD> <TD> <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR height=20> <TD align=middle width=40>文件:</TD> <TD>论文阅读笔记.pdf</TD></TR> <TR height=20> <TD align=middle width=40>大小:</TD> <TD>199KB</TD></TR> <TR height=20> <TD align=middle width=40>下载:</TD> <TD><A href="http://blogimg.chinaunix.net/blog/upfile2/080602171320.pdf">下载</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>
查看全文
发表于:2008-06-02 ┆
阅读(81)
┆
评论(0)
(转)A Tcl/Tk and Expect Tutorial
<DIV><PRE><FONT color=#0000ff>ps:自己写总觉得底气不足,特别是读了《Exploring Expect》后,更觉得自己懂的太少。还是转一个别人写的expect tutorial吧。</FONT></PRE><PRE> Landmark Graphics Corporation World Wide Technology Conference Houston, Texas December 1, 1994 A Tcl/Tk and Expect Tutorial by: Will Morse BHP Petroleum Copyright 1994 Will Morse. Permission is given to freely copy and distribute this paper as long as there is no charge except real and actual mechanical copying costs and as long as this notice is kept with each copy so others may copy it as well. The opinions expressed are the author's own and do not necessarily reflect the opinions or policies of The Broken Hill Propriet……
查看全文
发表于:2008-06-02 ┆
阅读(132)
┆
评论(0)
(转)Programming Texts and Tutorials--good!
<span style="color: rgb(255, 1, 2); font-weight: bold;">原文太长了,我只转了语言的部分,全文可以到http://stommel.tamu.edu/~baum/programming.html浏览。</span><br><p><a name="assembly"></a></p><ul><font size="4"><li><p><a name="assembly">assembly language</a> </p><p> </p><ul><li><a href="http://www.tldp.org/HOWTO/Assembly-HOWTO/"> Linux Assembly HOWTO</a> - Francois-Rene Rideau and Konstantin Boldyshev (1996-2002) <p> </p></li><li><a href="http://linuxassembly.org/intro.html"> Introduction to UNIX Assembly Programming</a> - Konstantin Boldyshev (1999-2000) <p> </p></li><li><a href="http://linuxassembly.org/articles/linasm.html"> Using Assembly Language in Linux</a> - Phillip (Jan. 2001) <p> </p></li><li><a href="http://www-106.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux"> Inline Assembly for x86 in Linux</a> - Bharata B. Rao (Mar. 2001) <p> </p></li><li><a href="http://www.geocities.com/SiliconValley/Ridge/2544/asm/linux-asm.txt"> ……
查看全文
发表于:2008-05-30 ┆
阅读(109)
┆
评论(0)
(转)ETBA--PHI阶段的hazard分析技术
<P class=normal>The Energy Trace and Barrier Analysis is a professional-level procedure intended to detect hazards by focusing in detail on the presence of energy in a system and the barriers for controlling that energy. Use the Energy Trace and Barrier Analysis Tool (ETBA) when you need to detect potential energy within a well-known but complex system, such as acquisition of new weapon systems. The types of energy assessed include:</P> <UL> <LI>Electrical Energy <LI>Kinetic Energy (moving mass, such as a vehicle, a machine part, a bullet) <LI>Potential Energy (non-moving mass, such as a heavy object suspended overhead) <LI>Chemical Energy (explosives, corrosive material) <LI>Noise and Vibration <LI>Thermal (heat) <LI>Radiation (Nonionizing, such as microwaves, and ionizing, such as nuclear radiation and X-rays) <LI>Pressure (air, water) </LI></UL> <P class=normal>The five basic steps in the ETBA are:</P> <OL> <LI>Identify the types of energy present in a system. <……
查看全文
发表于:2008-05-29 ┆
阅读(97)
┆
评论(0)
ideas on hazard list
<DIV>Today I read some letures about safety engineering. I think I need to collect some<BR>hazard list as a basis for hazard identification. So I google the word "hazard list", indeed, there are few useful info I get, but I still find some interesting things.</DIV> <DIV> </DIV> <DIV>Different people list different hazards. </DIV> <DIV> </DIV> <DIV>The following two are examples:</DIV> <DIV> </DIV> <DIV>I. MARATHON COUNTY HAZARDS(coming from Marathon County Emergency Management Office)</DIV> <DIV>Natural Hazards<BR>1. Agricultural/hydrologic drought<BR>2. Dam failures<BR>3. Fires (forest and structural)<BR>4. Flooding<BR>5. Thunderstorms (including hail and lightning)<BR>6. Tornadoes<BR>7. Winter Storms</DIV> <DIV>Man-made Hazards<BR>1. Transportation accidents (aircraft, rail, trucking)<BR>2. Hazardous materials accidents/incidents<BR>3. Explosions<BR>4. Civil disturbances<BR>5. Bombs and bomb threats</DIV> <DIV> </DIV> <DIV>II. HAZARD LIST(coming from The……
查看全文
发表于:2008-05-29 ┆
阅读(95)
┆
评论(0)
(转)再没有比工资更重要的问题了
<p class="MsoNormal" style="text-indent: 24pt; line-height: 19pt;"> <span style="font-size: 12pt; font-family: 楷体_GB2312;"><font style="font-size: 14px; font-family: 楷体_GB2312;"> “再没有比工资更重要的问题了”,</font></span></p> <p class="MsoNormal" style="text-indent: 24pt; line-height: 19pt;"> <span style="font-size: 12pt; font-family: 楷体_GB2312;"><font style="font-size: 14px; font-family: 楷体_GB2312;"> “因为这个国家的大多数人都是靠工资生活的,他们生活水平的提高决定着这个国家的繁荣”。</font></span></p> <p class="MsoNormal" style="text-indent: 24pt; line-height: 19pt;"> <span style="font-size: 12pt; font-family: 楷体_GB2312;"><font style="font-size: 14px; font-family: 楷体_GB2312;"> “工资担负着工人在车间之外的全部负担,以及年老后他不能劳动时的生活。同时他也是一个有家庭的人,他也许是孩子们的父亲,他必须凭他挣的钱把孩子们培养成才。我们必须考虑到所有这些事实,让孩子们有衣可穿、有房可住,让他们受到教育,给他们生活的各种小享受”</font></span></p> <p class="MsoNormal" st……
查看全文
发表于:2008-05-25 ┆
阅读(100)
┆
评论(0)
RAD C++ Library 2.0下载
<table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/zip.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>radcpp2.0.mingw-gcc.zip</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>219KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080523230320.zip">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br>RAD C++库已经升级到了2.0,不过其正式的页面上还没有提供下载,只有forum中有链接。<br>收一个在自己的blog上以备不时之需。<br>
查看全文
发表于:2008-05-23 ┆
阅读(96)
┆
评论(0)