夜深人靜但愛睏中,所以不練習英文了~
直接切入主題~哈哈!
一樣是在 Macupdate.com 裡面發現她的,
她的超短簡介如下:
CalcService 3.3 - Calculates math formulas in any text editor.
感覺很炫吧!沒錯~仔細研究完真的還頗炫!
剛好可以搭配我這陣子愛用的 TextMate 在寫程式時順便驗算!
安裝很簡單~
但我作法跟她的 readme 稍微不同,
我把主程式扔到 /Library/Services 裡面然後 reboot 就完成囉!
然後呢~依照 readme 內容~
我可以在 TextMate / BBEdit / TextWrangler2 / SubEthaEdit 裡面,
填入 sqrt(69) ,
反白然後點選「服務」、「CalcService」、「Calculate & Append」,
在編輯視窗裡面的內容則會變成
sqrt(69) = 8.30662386292,
方便吧~就不用再打開計算機程式囉~酷吧!
有興趣的安裝試試看囉!
順便貼上她的 readme 部份內容~
Usage:
Select a formula (may contain white characters like space, tabulator,
new line, carriagereturn), choose Calculate & Append, Calculate & Replace,
Calculate & Show or Calculate & Copy in the services menu or or press the
associated shortcuts if available. If the formula is not correct
(or the result is undefined) CalcService just beeps or
displays an error message in the panel.
Operators/Numbers:
• floating point values: x.y or x,y
• add, subtract, multiply, divide, modulo, exponential: +-*/%^
• assign: =
Assigned variables are persistent and still available the next time
you're going to use CalcService. To define multiple variables in one formula,
separate the definitions with a semicolon (";"),
as part of a formula use parenthesis around the definition (see examples below)
• sign: +-
• parenthesis: ()
Functions (case-insensitive):
• exp (base e)
• exp10 (base 10)
• exp2 (base 2)
• ln (base e)
• log or log10 (base 10)
• log2 (base 2)
• sin (RAD)
• asin (-1...1)
• cos (RAD)
• acos (-1...1)
• tan (RAD)
• atan
• sqrt (square-root)
• abs (absolute)
• sign
• fact (factorial for statistics, combinations and variations etc.)
• ceil
• floor
• round
• sinh
• asinh
• cosh
• acosh
• tanh
• atanh
Constants (case-insensitive):
• pi (3.1415926535897932385)
• e (2.7182818284590452354)
• c (299792458.0 m/s)
• g (66.732e-12 N*m^2/kg^2)
• e0 (1.6021892e-19 As)
• u0 (1.2566e-6 V*s/(A*m)
• q (1.602189e-19 C)
• me (9.109534e-31 kg)
• mp (1.672614e-27 kg)
• mn (1.67492e-27 kg)
If you want to change those values or define new constants,
set one or more variables using the assignment-operator.
Examples:
5+4-3*(pi+6,3)
3*+5
7/--2
9/.125
mp*(c*c)
sqrt(exp(sin(pi/2))+7.5)
cos(ln(e)*pi)
exp(1)
abs(sin(sqrt(2)))*sign(cos(pi*pi))
9.3%2.5
2*3^-(1+1)
2007/10/25
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言