博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
好好学习
bilbo.cublog.cn
管理博客
发表文章
留言
收藏夹
· Compiler
· Unix_Linux
博客圈
音乐
相册
文章
· AutoHotKey
· C/C++
· Caml
· Perl
· Tcl & Expect
· 其他编程语言
· Visual Language
· Compiler Engineering
· Embedded System
· FieldBus
· Networking
· Hardware Desing
· Safety System
· Unix_Linux
· Software Engineering
· GSM/GSM-R
· 技术幽默
· 读书时间
· Good Resource
· 关注社会
· 胡言乱语
首页
关于作者
姓名:你知道 职业:IT 年龄:每年大一岁 位置:地球 个性介绍:挺笨 Email: bilbo0214@163.com
||
<<
>>
||
我的分类
文章列表 -
(转)Do the Right Thing
<h2><font size="+1">Do the Right Thing<br> Joseph Bergin</font></h2> <p><font size="+1"><br> <b>Context:</b> <br> Things are bad. Really bad.</font></p> <p><font size="+1"><br> <b>Forces</b>:<br> When things are bad it is really tough and bad things happen. </font></p> <p><font size="+1">When things get better the bad stuff doesn't happen any more and you feel good. Really good. </font></p> <p><font size="+1"><br> <b>Solution</b>: <br> Do the right thing. Make the bad thing better.</font></p> <p><font size="+1"><br> <b>Resulting Context</b>: <br> Things are good. Really good. </font></p> <p><font size="+1"><br> <b>Known Uses</b>: <br> When you were small your father would make the Monsters Under the Bed go away just by sticking his head in your room. He did the right thing. </font></p> <p><font size="+1">When you are really sick, eat your Mom's chicken soup. Only your Mom's. Only she knows how to do the right thing. </font></p> <p>……
查看全文
发表于:2008-08-28 ┆
阅读(17)
┆
评论(0)
(转)Language Principles
<h2>MacLennan's Language Principles</h2> <ol><li><p><strong>Abstraction</strong>: Avoid requiring something to be stated more than once; factor out the recurring pattern. </p><p> </p></li><li><p><strong>Automation</strong>: Automate mechanical, tedious, or error-prone activities. </p><p> </p></li><li><strong>Defense in Depth</strong>: Have a series of defenses so that if an error isn't caught by one, it will probably be caught by another. <p> </p></li><li><p><strong>Information Hiding</strong>: The language should permit modules designed so that (1) the user has all of the information needed to use the module correctly, and nothing more; (2) the implementor has all of the information needed to implement the module correctly, and nothing more. </p><p> </p></li><li><p><strong>Labeling</strong>: Avoid arbitrary sequences more than a few items long; do not require the user to know the absolute position of an item in a list. Instead, associate a meaningfu……
查看全文
发表于:2008-08-28 ┆
阅读(18)
┆
评论(0)
GUI wrapper for DLL/LIB to .a file
闲的无聊用ocaml写了一个DLL/LIB转.A文件的GUI封装。使用的是labtk,ocaml的强类型的确是比较强,害的我filepattern的值改了半天才编译过去。<br><br>手动执行转换可以参加下面的文档:<br><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/pdf.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>将dll或lib文件转换成a文件.pdf</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>44KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080827174953.pdf">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br><br>GUI版本的ocaml源代码如下:<br><div style="border: 2px solid rgb(0, 0, 221); backgroun……
查看全文
发表于:2008-08-27 ┆
阅读(28)
┆
评论(0)
(转)Introduction to Distributed System Design
<h1 class="page_title">Introduction to Distributed System Design</h1> <h3>Table of Contents</h3> <div class="toc"> <div class="column"> <dl><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#Audience">Audience and Pre-Requisites</a></dt></dl> <dl><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#Basics">The Basics</a></dt><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#How">So How Is It Done?</a></dt><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#RPC">Remote Procedure Calls</a></dt><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#Design">Distributed Design Principles</a></dt><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#Exercises">Exercises</a></dt><dt><a href="http://code.google.com/edu/parallel/dsd-tutorial.html#References">References</a></dt></dl> </div> </div> <hr> <h3><a name="Audience" id="Audience"></a>Audience and Pre-Requisites</h3> <……
查看全文
发表于:2008-08-26 ┆
阅读(25)
┆
评论(0)
(转)不一般的软件bug
<h2><span class="mw-headline">Heisenbugs</span></h2> <p>A <b>heisenbug</b> is a <a href="http://en.wikipedia.org/wiki/Computer_bug" title="Computer bug" class="mw-redirect">computer bug</a> that disappears or alters its characteristics when it is researched.</p> <p>One common example is a bug that occurs in a release-mode <a href="http://en.wikipedia.org/wiki/Compiler" title="Compiler">compile</a> of a <a href="http://en.wikipedia.org/wiki/Computer_program" title="Computer program">program</a>, but not when researched under debug-mode; another is a bug caused by a <a href="http://en.wikipedia.org/wiki/Race_condition" title="Race condition">race condition</a>. The name "heisenbug" is a pun on the "<a href="http://en.wikipedia.org/wiki/Werner_Heisenberg" title="Werner Heisenberg">Heisenberg</a> <a href="http://en.wikipedia.org/wiki/Uncertainty_principle" title="Uncertainty principle">uncertainty principle</a>," a <a href="http://en.wikipedia.org/wiki/Quantum_physics" title="Quantum phy……
查看全文
发表于:2008-08-26 ┆
阅读(27)
┆
评论(0)
(转)C/C++ in 5 days
<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/pdf.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>c_c++_in_five_days.pdf</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>161KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080823212841.pdf">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table>
查看全文
发表于:2008-08-23 ┆
阅读(38)
┆
评论(0)
(转)One-Day Compilers
<br><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/rar.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>One-Day Compilers.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>49KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817220014.rar">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br>一个介绍用ocaml工具集制作DSL(domain-specific language)编译器的讲义。<br>
查看全文
发表于:2008-08-17 ┆
阅读(51)
┆
评论(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/pdf.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>电子工程术语与定义列表.pdf</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>407KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817215718.pdf">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table>
查看全文
发表于:2008-08-17 ┆
阅读(61)
┆
评论(0)
没啥用的程序
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080817215534.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"><br><br><div style="text-align: left;">没什么主要功能的程序,主要是把从autohotkey论坛上看到的一些代码集成在一起试验一下。<br><br>源代码如下:<br><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/rar.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>NoUseDemo.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>393KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080817220340.rar">下载</a></td></tr> </tbody></table> </td></t……
查看全文
发表于:2008-08-17 ┆
阅读(58)
┆
评论(0)
(转)安全系统设计12原则
Twelve Principles for the Design of Safety-Critical Real-Time Systems<br><br>1.Regard the Safety Case as a Design Driver<br>2.Start with a Precise Specification of the Design Hypotheses<br>3.Ensure Error Containment<br>4.Establish a Consistent Notion of Time and State<br>5.Partition the System along well-specified LIFs<br>6.Make Certain that Components Fail Independently<br>7.Follow the Self-Confidence Principle<br>8.Hide the Fault-Tolerance Mechanisms <br>9.Design for Diagnosis<br>10.Create an Intuitive and Forgiving Man-Machine Interface<br>11.Record Every Single Anomaly<br>12.Provide a Never Give-Up Strategy
查看全文
发表于:2008-08-17 ┆
阅读(57)
┆
评论(0)
闲话安全关键系统系统(四)
闲话安全关键系统系统(四)<br><br>这一篇,咱们说说功能安全(Functional Safety)。这个概念是IEC 61508标准最关注的。<br><br>啥是功能安全?简单的说,就是系统中与安全有关的系统功能。<br><br>既然有功能安全,就有非功能安全。这么说还是不好理解,举个例子。城市里有火车,很多火车是要经过城区的,这样会与普通的道路有交叉,在交叉口的地方一般都会设置道口进行管理,那里有护栏,当有火车接近的时候,护栏就回放下,相应的信号灯会变红,禁止车辆和行人通过。当列车通过以后,护栏又会抬起,信号灯变绿,允许车辆和行人通过。有时候也会设有警笛提示。我高中时所在的县城里就有这样的东西,每天上学放学都要经过。不过,我们那里的是人工手动操作的。<br>不过可以设想一下,有这样一套系统它可以完成这些功能,即操作信号灯和护栏。对于这样的系统,功能安全主要关注以下方面:当列车接近道口的时候,护栏有没有可能不能落下?当列车接近道口的时候,信号灯和警笛能否正常工作?当信号灯或护栏发生故障的时候,操作人员如何知道?护栏放下以后,路上的车辆能否注意到它? 等等。<br><br>而非功能安全可能关注:制作护栏的材料是否有毒?护栏的润滑油是否有毒?会不会……
查看全文
发表于:2008-08-17 ┆
阅读(91)
┆
评论(0)
(转)Basic FTP Commands
<table> <tbody><tr><td align="left"> <img src="http://www.cs.colostate.edu/helpdocs/Figures/csbanner7.gif" alt="Colorado State University "> </td><td align="right"> <h1 align="right"> <font color="NAVY"> Basic FTP Commands </font></h1> </td></tr><tr> </tr></tbody></table> <hr color="NAVY" noshade="noshade"> <hr color="NAVY" noshade="noshade"> <dl><h3>What is FTP?</h3><dd>The FTP (<b>F</b>ile <b>T</b>ransfer <b>P</b>rotocol) utility program is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. FTP is a general protocol that works on UNIX systems as well as a variety of other (non-UNIX) systems. <br><br> </dd><dd>For the purposes of this Web page, the <em>local</em> machine refers to the machine you are initially logged into, the one on which you type the <b>ftp</b> command. The <em>remote</em> machine is the other one, the one that is the argument of t……
查看全文
发表于:2008-08-15 ┆
阅读(49)
┆
评论(0)
real programmer
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080815110304.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"></div>
查看全文
发表于:2008-08-15 ┆
阅读(83)
┆
评论(0)
纹波和浪涌
一、纹波(ripple)的定义<br> <br>1. 纹波(ripple)的定义 <br> <br> 由于直流稳定电源一般是由交流电源经整流稳压等环节而形成的,这就不可避免地在直流稳定量中多少带有一些交流成份,这种叠加在直流稳定量上的交流分量就称之为纹波。纹波的成分较为复杂,它的形态一般为频率高于工频的类似正弦波的谐波,另一种则是宽度很窄的脉冲波。对于不同的场合,对纹波的要求各不一样。对于电容器老练来说,无论是那一种纹波,只要不是太大,一般对电容器老练质量不会构成影响。而对程控机电源或音响设备中所使用的电源,由于宽度很窄的脉冲没有足够的能量来推动喇叭的纸盆或话机的听筒而形成杂音。因此对于这种窄脉冲的要求可以放宽。 <br> 而对于音频范围内的类似正弦波的纹波信号,虽然其幅度不是太高,但其能量却使喇叭或听筒发生嗡嗡的杂音。因此对这种形态的纹波应有一定的要求,而对于用于一些控制的场合,由于窄脉冲达到一定的高度会干扰数字或逻辑控制部件,使设备运行的可靠性降低,因此对这种窄脉冲的幅度应有一定的限制,而对类似正弦波的纹波,一般由于其幅度较低,对控制部件的干扰不大。 <br> &……
查看全文
发表于:2008-08-15 ┆
阅读(57)
┆
评论(0)
(转)How to wrap C functions to OCaml
<div> This document is a small tutorial that introduces how to call C functions from OCaml. Which is usefull if you want to make a mixed C and OCaml application, if you want to call some functions you need from a C library, or to write a complete binding to a C library. </div><br><hr> <h3><span>Contents</span></h3> <ul><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_quick_start"><span>Quick start</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_compile"><span>Compiling C and OCaml together</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_basic_types"><span>Returning Basic Types</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#ref_tuple_access"><span>Accessing Tuples</span></a></li><li><a href="http://www.linux-nantes.org/%7Efmonnier/OCaml/ocaml-wrapping-c.php#……
查看全文
发表于:2008-08-01 ┆
阅读(65)
┆
评论(0)
(转)Win32 DLL from OCaml lib
<div class="content"> <div> <div class="intro"> <div class="title">ODLL</div> <p> If you're having a boss asking you to write C librairies but if you prefer to write them in OCaml, this tool is for you ! ODLL is creating a Win32 DLL from an OCaml library, and automatically generating the C stubs needed to interface the OCaml code and the C code and the .H interface. Simply run ODLL with you CMA/CMXA and one or several CMI interfaces and ODLL will do the job for you.</p> </div> <h2>Installation</h2> <p> Since ODLL require one part of the OCaml sources, you'll need to get them from the INRIA CVS if you want to recompile ODLL. For convenience, a precompiled version is included in the distribution, which only require OCaml to be installed. You only need the odll.exe file to use odll. A sample is provided in the /sample directory. </p> <h2>Usage</h2> <ul><li>First, create an OCaml library (CMA or CMXA) using ocaml compilers (ocamlc or ocamlopt).</li>……
查看全文
发表于:2008-08-01 ┆
阅读(62)
┆
评论(0)
(转)OCaml数据类型和匹配
<div id="post-96" class="hentry p1 page publish author-shiningray category-diary tag-ocaml tag-%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b y2007 m12 d28 h20"> <h2 class="entry-title">数据类型和匹配</h2> <div class="entry-content"> <p>原文地址:<a href="http://www.ocaml-tutorial.org/data_types_and_matching" rel="external">http://www.ocaml-tutorial.org/data_types_and_matching</a> 翻译:<a href="http://wiki.nirvanastudio.org/wiki/ShiningRay">ShiningRay</a></p> <h2><a name="Linked_lists" id="Linked_lists">链表(Linked List)</a></h2> <p class="first_para">和Perl一样,OCaml也将对列表的支持直接内建在语言中了。OCaml中一个列表的所有元素的类型必须一致。使用以下格式来写列表:</p> <pre class="code" lang="ocaml">[1; 2; 3]<br></pre> <p class="first_para">(注意是分号,不是逗号)。</p> <p><code>[]</code> 表示空列表。</p> <p>一个列表有一个“<strong>头</strong>”(第一个元素)和一个“<strong>尾</strong>”(剩下的元素)。头是一个元素,而尾则是一个列表,所以前面的例子中,表头是整数<code>1</cod……
查看全文
发表于:2008-07-31 ┆
阅读(56)
┆
评论(0)
A good tutorial for PROFIBUS-DP
在网络上闲逛,发现这个PDF很短但讲的又很清楚,难得。<br><br><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/rar.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>Protocol.rar</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>471KB</td></tr> <tr height="20"><td align="center" width="40">下载:</td><td><a href="http://blogimg.chinaunix.net/blog/upfile2/080731165709.rar">下载</a></td></tr> </tbody></table> </td></tr> </tbody></table><br><br>我是从一个叫鼎实创新的公司的网站上下的,这个公司看上去比较有意思,只做Profibus相关的产品,国内我还没有发现其它类似的公司。http://www.c-profibus.com.cn/company/company.htm<br><br>Another tutorial:<br><table style="b……
查看全文
发表于:2008-07-31 ┆
阅读(67)
┆
评论(0)
2008年7月读书
<div align="center"><img src="http://blogimg.chinaunix.net/blog/upfile2/080727225641.jpg" onload="javascript:if(this.width>500)this.width=500;" border="0"><br><br><div style="text-align: left;">以前读它的C语言版,没读两章就因为种种原因放弃了,现在因为自学OCaml,所以又借来读读。<br></div></div>
查看全文
发表于:2008-07-27 ┆
阅读(79)
┆
评论(1)
(转)Ada in the French TGV (High-Speed Rail) System
<h1><p class="pagetitleheader">Ada in the French TGV (High-Speed Rail) System</p></h1> <p> </p><p class="nestedheader"><b>On-board with Safety Critical Software: Implementing Safety Critical Software for High-Speed Railway Transportation</b></p> <p class="bodyblack"> By Marc Richard-Foy, Alsys, and Gilles Legoff, CSEE-Transport <br> (source: Alsys World Dialogue, vol. 8, no. 2, Summer 1994) </p><p> </p><p class="nestedheader"><b>Background</b></p> <p class="bodyblack"> As computer control becomes more and more extensive in our everyday lives, safety critical software systems are taking on increasing importance. Hospitals, avionics, and ground transportation systems rely on safety critical practices to supply their clients with safe, reliable products and services that inspire confidence. </p><p class="bodyblack">While software solutions for critical applications are attractive for their flexibility, they also bring the chance of error. Positive measur……
查看全文
发表于:2008-07-27 ┆
阅读(58)
┆
评论(0)