Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, May 19, 2011

Health-index formulas

Body Mass Index (BMI)

The formulae universally used in medicine produce a unit of measure of kg/m2.

HP calculator's solver equation:
BMI = KG÷SQ(CM÷100)
  • KG = kilograms
  • CM = centimeters 
Calculator technique
ส่วนใหญ่มักจะคำนวณค่าส่วนสูงยกกำลังสองก่อน แล้วค่อยมาตั้งค่าน้ำหนักหารด้วยค่ากำลังสอง
วิธีที่ง่ายกว่าคือ
  1. ตั้งค่าน้ำหน้ก (kg)
  2. หารส่วนสูง (m: ปกติบอกเป็น cm ก็ทดทศนิยม 2 ตำแหน่งไปเลย)
  3. หารส่วนสูงซ้ำอีกที

Cholesterol-HDL-LDL-Triglyceride equation
HP-calculator solver:
CHOL = HDL+LDL+TGCR/5

Friday, April 9, 2010

Lotus-Notes mail rule for auto-forwarded mail from GMail

When an email X is sent from A to B who uses GMail, and B sets filter to auto-forward to C; envelope-address of X will still show A as sender.  However, C cannot define mail rule that sender is A!

Reason
As X is coming from Internet (GMail), there will be field "SMTPOriginator".  And in this case the fields 'SMTPOriginator' = B and 'From' = A; and 'Sender' in mail rule will check field 'SMTPOriginator' instead: i.e., sender becomes B not A.

Wednesday, October 14, 2009

Yammer links

i.e., those appended to "https://www.yammer.com/..."

Link to
Do this
i.e., (syntax)
Single message
Check from its time-stamp
.../messages/{message#}
Message threadReplace "messages" of message link with "threads"..../threads/{message#}
Thread with initial-message highlighted

.../threads/{message#}?message_id={message#}
Thread with reply-message highlighted
Click the reply's time-stamp to get its own page, then check the link from "in reply to" clause..../threads/{message#}?message_id={reply-message#}&replied_to_id={message#}


Also:

  • Popular tags = https://www.yammer.com/tags/popular


Wednesday, January 7, 2009

Lotus-Notes client's button in universal toolbar for generating simple-text mail header

  1. Menu: File |Preferences |Toolbar prefrences
  2. Edit Toolbar Button

Button caption text, Popup help text = "Insert mail header"
Formula:
xx := @Prompt([OkCancelList]; "Name format"; "Choose between CN (domain suppressed) and Abbreviate (Internet-oriented)."; "CN"; "CN" : "Abbreviate");

@Command([EditDocument]; "1");
@Command([EditGotoField]; "Body");
@Command([EditInsertText]; @NewLine);

x1 := "; " +@Text(@If(@IsAvailable(PostedDate); PostedDate; @Created)) +@NewLine;

@If(xx = "CN"; @Do(
@Command([EditInsertText]; "From:" +@Char(9) +@Name([CN]; From) +x1);
@Command([EditInsertText]; "To:" +@Char(9) +@Implode(@Name([CN]; SendTo); ", ") +@NewLine);
@Command([EditInsertText]; "CC:" +@Char(9) +@Implode(@Name([CN]; CopyTo); ", ") +@NewLine);
@Command([EditInsertText]; "BCC:" +@Char(9) +@Implode(@Name([CN]; BlindCopyTo); ", ") +@NewLine)
); @Do(
@Command([EditInsertText]; "From:" +@Char(9) +@Name([Abbreviate]; From) +x1);
@Command([EditInsertText]; "To:" +@Char(9) +@Implode(@Name([Abbreviate]; SendTo); ", ") +@NewLine);
@Command([EditInsertText]; "CC:" +@Char(9) +@Implode(@Name([Abbreviate]; CopyTo); ", ") +@NewLine);
@Command([EditInsertText]; "BCC:" +@Char(9) +@Implode(@Name([Abbreviate]; BlindCopyTo); ", ") +@NewLine)
));

@Command([EditInsertText]; "Subj:" +@Char(9) +Subject +@NewLine);
@Command([EditInsertText]; @NewLine);
@All

Tuesday, May 27, 2008

HP-calculator equation, financial investment formula

This equation is for quick calculation of buying/selling stocks.
IF(S(AMT) OR S(VOL): AMT-VOL*PRICE :
(VOL*PRICE-ABS(VOL*PRICE*COM%/100*(1+VAT%/100)))-TOTAL)
Input negative value either AMT or VOL to indicate buying.
Note that I use '*' and '/' for multiply and divide operators respectively (the calculator uses exact arithmatic symbols).
However, few weeks later I revised to this version:
TRADE: IF(S(AMT) OR S(VOL) OR S(PRICE): AMT-VOL*PRICE : VOL*PRICE*COM%/100*(1+TAX%/100)-FEE)
  • Assign formula's label.
  • Handle when price is queried.
  • Only calculate fee (commission + tax) instead of total. To get total, press: [AMT] [+ or -] [FEE (twice, first time it will beep)]

I should add more from HP 200LX later.

Cheers,
[vps]