{"id":215,"date":"2009-03-10T00:00:32","date_gmt":"2009-03-10T07:00:32","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=899"},"modified":"2009-03-10T00:00:32","modified_gmt":"2009-03-10T07:00:32","slug":"harmonic-series","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=215","title":{"rendered":"Harmonic Series"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nvar harmonic:Number = 0;\r\nvar k:Number = 1;\r\naddEventListener(Event.ENTER_FRAME, onLoop);\r\nfunction onLoop(evt:Event):void {\r\n\t harmonic += 1 \/ k;\r\n\t trace(&quot;+&quot;);\r\n\t trace(&quot;1 \/ &quot; + k + &quot;              =              &quot; + harmonic);\r\n\t k+=1;\r\n}\r\n<\/pre>\n<p>Read more about the harmonic series at <a href=\"http:\/\/en.wikipedia.org\/wiki\/Harmonic_series_(mathematics)\" target=\"blank\">wikipedia<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/actionsnippet.com\/wp-content\/harm_series.jpg\" \/><br \/>\n1 \/ 1              =              1<br \/>\n+<br \/>\n1 \/ 2              =              1.5<br \/>\n+<br \/>\n1 \/ 3              =              1.8333333333333333<br \/>\n+<br \/>\n1 \/ 4              =              2.083333333333333<br \/>\n+<br \/>\n&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>var harmonic:Number = 0; var k:Number = 1; addEventListener(Event.ENTER_FRAME, onLoop); function onLoop(evt:Event):void { harmonic += 1 \/ k; trace(&quot;+&quot;); trace(&quot;1 \/ &quot; + k + &quot; = &quot; + harmonic); k+=1; } Read more about the harmonic series at wikipedia. 1 \/ 1 = 1 + 1 \/ 2 = 1.5 + 1 \/ 3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121],"tags":[3,4,122],"class_list":["post-215","post","type-post","status-publish","format-standard","hentry","category-math","tag-actionscript","tag-flash","tag-math"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=215"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/215\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}