Thursday, May 3, 2007

Thursday, March 1, 2007

一个女孩曾经对我的真心表白

hi,我最爱的人,你现在还好吗?也许我现在没有权利跟你说这句话,但是如果一个人爱一个人的话,却只能埋在心里,不能交谈,不能见面,你说这又何尝不是一种可以理解的痛苦。也许你现在还很讨厌我,或者是已经把我给忘了,但是我还是很满足,我很感谢上沧,因为上苍让我们认识,相爱;虽然给过我们短暂的分离,但是又让我们重逢,这仁慈对我来说已经很足够,虽然我们已经分手了但是我会永远爱你并记着你的。人生是短暂的,在追求爱情的时候,如果没有一种理智的思维与生命的觉悟,人生将被一个巨大的阴影笼罩,这个阴影就是:情网。当你付出的爱一时没有着落时,宁愿放弃爱的收获而坚守爱的本身,因为你所爱的人正是你自己认为值得爱的人,爱一个人就是要对方幸福,所以,学着放弃自己所爱的人是因为,只是因为太爱一个人,~~~~~~~~~~~~~~~~~~~~~这就是我------对自己所爱的人说的一句心里话。如果你还记得我的话,就请记着我们以前幸福的瞬间。

Wednesday, February 28, 2007

[php]
;;;主程序(prompt "请输入solve命令!")
(defun C:solve (/ f x1 x2 n id err result str1 str2 str3 str4 str5)
(setq id (load_dialog "solve1.dcl"))
(if (new_dialog "dcl_solve" id)
(progn (action_tile "p1" "(setq f $value)") ;从对话框中得到表达式
(action_tile "p2" "(setq x1 $value)") ;从对话框中得到下届
(action_tile "p3" "(setq x2 $value)") ;从对话框中得到上届
(action_tile "p4" "(setq n $value)") ;从对话框中得到精度
(action_tile "help" "(choose 1)") ;帮助
(start_dialog)
(unload_dialog id)
(if (and x1 x2 n f)
(progn
(setq x1 (atof x1) x2 (atof x2) n (abs (atoi n)) n (if (> n 20) 20 n))
(setq err (vl-catch-all-apply 'zbrent (list f x1 x2 n)))
(if (vl-catch-all-error-p err)
(alert (strcat "方程无解或者" (vl-catch-all-error-message err)))
(progn
(setq str1 (car result) str2 "\n下面是求解验证结果:" str3 (cadr result) str4 (caddr result) str5 (strcat str1 str2 "\nf(" str3 ")=" str4) )
(alert str5)
(princ str5) ) ) ) ) ) )
(princ) );;;
*********************************************
;;;用Van Wijingaarden-Dekker-Brent方法求解的函数
;;;*********************************************
(defun zbrent (f x1 x2 n / a b c d e fa fb fc EPS ITMAX i xm test tol tol1 min1 min2 p q r s fra_x int_x)
(setq tol (expt 0.1 n));容差
(setq ITMAX 10000) ;最大迭代次数
(setq EPS 1e-16) ;计算机有效精度
(if (> x1 x2) ;如果下届大于上届
(setq a x2 b x1 c x1);则交换上下界
(setq a x1 b x2 c x2) )
(setq fa (func a))
(setq fb (func b))
(if (or (and (> fa 0) (> fb 0))
(and (<> fb 0) (> fc 0))
(and (<>= (abs e) tol1)
(> (abs fa) (abs fb)))
(progn (setq s (/ fb fa));将进行第二次反插
(if (equal a c 1e-16)
(setq p (* 2.0 xm s) q (- 1.0 s) )
(setq q (/ fa fc)
r (/ fb fc)
p (* s (- (* 2.0 xm q (- q r)) (* (- b a) (1- r))))
q (* (1- q) (1- r) (1- s)) ) )
(if (> p 0) (setq q (- q)));检查是否在解区间内
(setq p (abs p))
(setq min1 (- (* 3.0 xm q) (abs (* tol1 q))))
(setq min2 (abs (* e q))) (if (< (* 2.0 p) (if (<> (abs d) tol1);计算新的实验解
(setq b (+ b d))
(setq b (+ b (if (>= xm 0)(abs tol1) (- (abs tol1))))) )
(setq fb (func b)) ) ) (setq i (1+ i)) ) (setq test (func b))
(setq fra_x (rtos (- (abs b) (fix (abs b))) 2 n))
(setq fra_x (vl-string-left-trim "0" fra_x))
(setq int_x (itoa (fix b))) (if (equal test 0 1)
(setq result (strcat "\n方程" f "=0" "的解为:" int_x fra_x)
result (list result (strcat int_x fra_x) (rtos test 1 n)) )
(setq result (strcat "\n方程" f "=0" "在此区间无解")
result (list result (strcat int_x fra_x) (rtos test 1 n)) ) ))
;;;帮助说明函数
(defun choose (n)
(if (= n 1)
(alert "方程式只接受x(小写)为变量,不规范很可能出错!
\n无须写等式,例如求解x^2-2=0写作x^2-2.
\n程序采用brent方法求解,不保证每个方程都有效!
\n有什么问题email: highflybird@sina.com" )
;;(set_tile "error" "方程式只接受x(小写)为变量,无须写等式,例如求解x^2-2=0写作x^2-2.") ))
;;;用方式1定义表达式求值函数
(defun func1 (x) (arxload "geomcal.arx") (cal f))
;;;用方式2定义表达式求值函数
(defun func (x / fun vbeval)
(setq fun f)
(while (Wcmatch fun "*x*")
(setq fun (vl-string-subst (rtos x 2 20) "x" fun)) )
(vla-eval (vlax-get-acad-object) (strcat "ThisDrawing.SetVariable \"users1\",Cstr(" fun ")") ) (atof (getvar "users1")))
[/php]

Friday, January 19, 2007

时间是一台不停地卷走你脚下地毯的机器

今天我创建了一个博客!
人们总喜欢回头看看,甚至是排泄物!这也许是人类的习性。
我每次回头看过去时,总是茫然,茫然得想哭,却哭不出来。
时间是一台不停地卷走你脚下地毯的机器,把你所走过的每一寸土地全部沦陷,把你所得到的全都沉入那深深的海洋里,让你永远也找不到,拾不起,收不回,任它在海底化为尘泥或者沙石,幸运的话可以变成珍珠。
把我的感想慢慢记录下来吧,让时光这个恶魔吞噬吧,希望在以后的某一天,或许能找到它吐出来的残渣。