{"id":8178,"date":"2013-05-23T15:57:50","date_gmt":"2013-05-23T13:57:50","guid":{"rendered":"http:\/\/fdt.powerflasher.com\/?p=8178"},"modified":"2013-05-23T17:01:50","modified_gmt":"2013-05-23T15:01:50","slug":"calculator-in-code","status":"publish","type":"post","link":"https:\/\/fdt.powerflasher.com\/blog\/2013\/05\/calculator-in-code\/","title":{"rendered":"FDT tips &#038; tricks #1: Calculator in code"},"content":{"rendered":"<p dir=\"ltr\"><a href=\"http:\/\/fdt.powerflasher.com\/2013\/05\/calculator-in-code-ctrl-0-cmd-0\/calculatornumbers\/\" rel=\"attachment wp-att-8179\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-8179\" title=\"CalculatorNumbers\" src=\"http:\/\/fdt.powerflasher.com\/wp-content\/uploads\/2013\/05\/CalculatorNumbers-440x186.png\" alt=\"\" width=\"440\" height=\"186\" srcset=\"https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorNumbers-440x186.png 440w, https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorNumbers-230x97.png 230w, https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorNumbers.png 901w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p dir=\"ltr\">You can calculate simple constant <em>integer<\/em> expressions during coding in FDT by simple hitting <strong>Ctrl-1<\/strong> (Windows, Linux) or <strong>Cmd-1<\/strong> (MacOS). In the auto completion description window you can see all steps of the calculation. You can insert the result into your code by selecting this auto completion.<\/p>\n<p dir=\"ltr\"><a href=\"http:\/\/fdt.powerflasher.com\/2013\/05\/calculator-in-code-ctrl-0-cmd-0\/calculatorhexcolor\/\" rel=\"attachment wp-att-8180\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-8180\" title=\"CalculatorHexColor\" src=\"http:\/\/fdt.powerflasher.com\/wp-content\/uploads\/2013\/05\/CalculatorHexColor-440x186.png\" alt=\"\" width=\"440\" height=\"186\" srcset=\"https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorHexColor-440x186.png 440w, https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorHexColor-230x97.png 230w, https:\/\/fdt.powerflasher.com\/blog\/wp-content\/uploads\/2013\/05\/CalculatorHexColor.png 902w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p dir=\"ltr\">If one of the constants is a hex constant the result is also available as hex value. Also the hex values are shown with colors in case you need color calculations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can calculate simple constant integer expressions during coding in FDT by simple hitting Ctrl-1 (Windows, Linux) or Cmd-1 (MacOS). In the auto completion description window you can see all steps of the calculation. You can insert the result into your code by selecting this auto completion. If one of the constants is a hex [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/posts\/8178"}],"collection":[{"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/comments?post=8178"}],"version-history":[{"count":24,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/posts\/8178\/revisions"}],"predecessor-version":[{"id":8185,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/posts\/8178\/revisions\/8185"}],"wp:attachment":[{"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/media?parent=8178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/categories?post=8178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fdt.powerflasher.com\/blog\/wp-json\/wp\/v2\/tags?post=8178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}