What is the Decision Channeling Calculator?

The Decision Channeling Calculator was created as an experimental device.  This Calculator demonstrates that software in the JavaScript and spreadsheet formats can be created with decision making capabilities, coupled with the functional capacity to channel numbers through predetermined pathways, and to perform over 100 calculations simultaneously.

 

The Computer Code of the Javascript Version of the Decision Channeling Calculator

 

David@TechForText.com © 2010

TechForText Network™

 

To contact the author use the above email address,

or left click on these words for a website communication form.

 

For the main webpage of the

 Decision Channeling Calculator

left click on these words.

 

 

If you want information on the JavaScript Code of the
Decision Channeling Calculator scroll down

Alternatively, you can left click on these words

to go directly to the table of contents of this website.

 

What is the Decision Channeling Calculator?

© David@TechForText.com

The Decision Channeling Calculator was created as an experimental device.  This Calculator demonstrates that software in the JavaScript and spreadsheet formats can be created with decision making capabilities, coupled with the functional capacity to channel numbers through predetermined pathways, and to perform over 100 calculations simultaneously.

 

The online JavaScript version of the Calculator

can be accessed by left clicking on these words.

 

If you have not seen the main webpage,

for the Decision Channeling Calculator, you

can view it by left clicking on these words

 

If you want the Decision Channeling Calculator

in the spreadsheet format (Excel or OpenOffice) go

to the main webpage, by left clicking on the above.

 

 

Hyperlink Table of Contents of this Website

Left click, on the upper portion of the title or subtitle you are interested in, and the material you want will appear on your screen.  Alternatively, you can scroll down or up, and browse the titles and subtitles. 

 

The Top of this Webpage

© David@TechForText.com

 

What is the Decision Channeling Calculator?. 2

© David@TechForText.com. 2

Computer Code and the JavaScript 6

Version of the Decision Channeling Calculator 6

© David@TechForText.com. 6

How the JavaScript Version of the. 6

Decision Channeling Calculator Was Created. 6

© David@TechForText.com. 6

Two Types of Computer Code. 8

© David@TechForText.com. 8

Compare the Computer Code from the  10

Spreadsheet and JavaScript Versions of the. 10

Decision Channeling Calculator 10

© David@TechForText.com. 10

Spreadsheet and JavaSript Versions, 10

The Reasons for the Obvious Differences  10

© David@TechForText.com. 10

Comparing the Decision-Making Code. 14

© David@TechForText.com. 14

The Computer Code for the Calculations  16

In The Yellow and Green Boxes of The  16

Decision Channeling Calculator 16

© David@TechForText.com. 16

The Code in the Yellow and Green. 16

Boxes of the Spreadsheet Version. 16

© David@TechForText.com. 16

A PORTION OF THE JAVASCRIPT CODE FOR THE. 19

YELLOW AND GREEN BOXES OF THE. 19

DECISION CHANNELING CALCULATOR. 19

© David@TechForText.com. 19

The Entire Computer Code From the JavaScript 22

Version of the Decision Channeling Calculator 22

© David@TechForText.com. 22

 

Computer Code and the JavaScript

Version of the Decision Channeling Calculator

© David@TechForText.com

 

How the JavaScript Version of the

Decision Channeling Calculator Was Created

© David@TechForText.com

The Computer Code from the online JavaScript version of the Decision Channeling Calculator is very complex.  It consists of 2881 lines of code, which is based on the figure obtained when it was open in and Sothink HTML editor.  This code was not manually written; it was created directly from the spreadsheet version, by means of a computerized conversion process, involving specialized software, which generates JavaScript code, inserted into an HTML webpage.  It would take a human about six months, if not longer, to create code of this complexity manually; it is about 84 pages.  However, it took the computer a minute or so, to generate this code based on the spreadsheet version of the Decision Channeling Calculator.  Attempting to create code of this complexity manually is similar to erecting a 10-story building with hand tools, and without a crane. 

 

      After the computer code was generated, it was edited slightly, and then two copies were created.  One copy of this code was pasted into the top of the main webpage, using an HTML editor.  The other copy is a printer friendly version, without any superfluous text from the main webpage.

 

The editing involved removing a segment of code from the onload section of the webpage, which is: document.formc.p1E8.focus();  This was done to prevent automatic scrolling to the nearest input box, when the webpage is opened.  This modification was necessary because I wanted the webpage to open on the very top.  In addition, the Calculator was centered, a tan texture background was inserted, and a title with related information was added for the indexing of search engines.  The title and information is only visible to search engines.

 

In spite of the editing, the spreadsheet version used to generate the code for the JavaScript version, appears almost identical.  If you want to compare the spreadsheet and JavaScript versions see the links bellow. 

 

To see the spreadsheet version that was used to generate the code for the JavaScript version of the Decision Channeling Calculator, left click on these words.  This link will only open if you have Microsoft Excel on your computer.

 

To see the JavaScript version of the Decision Channeling Calculator, which was created from the above, left click on these words. 

 

 

Two Types of Computer Code

© David@TechForText.com

The computer code from the JavaScript version of the Decision Channeling Calculator consists of HTML code, as well as JavaScript.

The JavaScript code is used for the calculations, formulas, and decision-making and channeling process.  The HTML code is primarily used to generate a webpage, for the text and the placement of graphics. 

 

      A considerable portion of the HTML code is for formatting of text and the background.  This includes the font type and size, the text alignment, and background colors.  This can be seen in the following section of code of the Decision Channeling Calculator.

Arial;

font-size : 10.00pt; font-style : normal; font-weight : 400;

padding-left : 1px; padding-right : 1px; padding-top : 1px;

text-align : left; vertical-align : bottom }

*.ee103 { background : blue; color : yellow;

font-family : Arial , sans-serif; font-size : 10.00pt; font-style : normal;

font-weight : 700; padding-left : 1px; padding-right : 1px;

padding-top : 1px; text-align : left; vertical-align : bottom }

*.ee106 { background : blue; color : yellow;

font-family : Arial , sans-serif; font-size : 10.00pt; font-style : normal;

font-weight : 400; padding-left : 1px; padding-right : 1px;

padding-top : 1px; text-align : left; vertical-align : bottom }

*.ee109 { background : blue; color : yellow;

font-family : Arial , sans-serif; font-size : 10.00pt; font-style : normal;

font-weight : 400; padding-left : 1px; padding-right : 1px;

padding-top : 1px; text-align : center; vertical-align : bottom }

*.ee115 { background : blue; color : windowtext; font-family : Arial;

font-size : 1.00pt; font-style : normal; font-weight : 400;

padding-left : 1px; padding-right : 1px; padding-top : 1px;

text-align : left; vertical-align : bottom }

 

 

 

Compare the Computer Code from the

Spreadsheet and JavaScript Versions of the

Decision Channeling Calculator

© David@TechForText.com

 

 

Spreadsheet and JavaSript Versions,

The Reasons for the Obvious Differences

© David@TechForText.com

 

Comparing the code from the two versions of the Calculator is interesting, and you will see some obvious differences.  The spreadsheet version consists of neat compact formulas. The code from the JavaScript version appears to be just the opposite.  It looks somewhat disorderly, complicated, and it contains a great deal more computer code.  There are a number of reasons for this, explained in the following paragraphs.

 

The spreadsheet version has a two dimensional graphic surface, (the spreadsheet itself) where formulas are entered.  The spreadsheet code from the graphic surface is not manipulated by modifying the code directly.  It is manipulated with built-in controls that modify the column and row dimensions.  This makes it unnecessary to make the spreadsheet code visible to the user.  However, the code from the graphic interface of the JavaScript version is visible.

 

The formatting code for the spreadsheet version is not shown either, because it is manipulated indirectly with built-in control features on the spreadsheet software.  In the JavaScript version, all of the formatting code is visible in any HTML editor, and it is extremely lengthy.

 

Another factor is the code that interprets the formulas, and carries out the instructions provided by the formulas, and their location on a spreadsheet.  This code is essentially a calculation engine, and it comprises a major part of the spreadsheet software itself, which in this case is either Microsoft Excel, or OpenOffice.  This code is NOT contained in any calculation devices made in the spreadsheet format.  It remains in the spreadsheet software, not in the individual spreadsheets.  This means devices created in the spreadsheet format, are essentially computer programs that are dependent on other software for their functionality.  For example, the spreadsheet version of the Decision Channeling Calculator cannot function without Microsoft Excel or OpenOffice. 

 

However, the situation is very different, with the JavaScript version than the above.  JavaScript calculation devices are complete computer programs, and are NOT dependent on any other software package for their operation, except for the standard Internet browser.  The reason for this is the JavaScript devices contain all of the computer code needed to function as independent programs, and this code is visible when a JavaScript device is opened in an editor.  The JavaScript version does not even require Microsoft Windows.  It can function in any operating system that has an Internet browser with JavaScript capabilities.  This includes Macintosh, and Linux, and a number of less well-known operating systems.  

 

Thus, the JavaScript version of the Decision Channeling Calculator is a computer program that contains all the code needed for it to function independently, which is not the case with the spreadsheet version.  The spreadsheet version contains a little over 200 formulas, which can be put on one or two pages.  However, the JavaScript version contains 2881 lines of computer code.  This code was pasted into a Word document, to obtain more statistics.  This revealed that the code was 84 pages in length, contained the equivalent of 18,371 words, with 165,191 characters, (characters with spaces 192,326).  All of this code is relatively massive (compared to the spreadsheet version), and all of it is visible, as you will see in the following paragraphs. 

 

 

Comparing the Decision-Making Code

© David@TechForText.com

The spreadsheet formulas are presented below for the decision making, and channeling process, of the Calculator.  This is followed by a portion of the JavaScript code that performs the same function, in the JavaScript version of the Decision Channeling Calculator.

 

The spreadsheet formula that channels non-even numbers through the yellow path is:

=IF((ROUNDDOWN((E8/2), 0)*2)-E8=0, "", E8)

 

The spreadsheet formula that channels even numbers through the green path is:

=IF((ROUNDDOWN((E8/2), 0)*2)-E8=0, E8, "" )

 

The code highlighted in white, below, contains the JavaScript version of the two formulas presented above.  Notice the difference in complexity.  

 

;var eetrue="true";var eefalse="FALSE";var eedec=".";var eeth=",";var eedecreg=new RegExp("\\.","g");var eethreg=new RegExp(",","g");var eecurrencyreg=new RegExp("[$]","g")

 

;var eepercentreg=new RegExp("%","g"); function calc(data){var c1E8=data.p1E8;var c1F22=data.p1F22;var

c1M22=data.p1M22;var c1F12=("=IF((ROUNDDOWN((E8/2), 0)*2)-E8=0, \", E8)")

 

;var c1F16=("=IF((ROUNDDOWN((E8/2), 0)*2)-E8=0, E8, \" )");var c1F24=("=IF((ROUNDDOWN((E8/2), 0)*2)-E8=0, M22, F22)");var c1I10=(((((((((rounddown((((v2n(c1E8))/(2))),(0)))*(2)))-(v2n(c1E8))))==(0)))?(""):(((c1E8=="")?0:c1E8))))

 

;var c1F17=(((((((((rounddown((((v2n(c1E8))/(2))),(0)))*(2)))-(v2n(c1E8))))==(0)))?(((c1E8=="")?0:c1E8)):("")))

 

;var c1F27=(((((((((rounddown((((v2n(c1E8))/(2))),(0)))*(2)))-(v2n(c1E8))))==(0)))?(c1M22):(c1F22)))

 

 

The Computer Code for the Calculations

In The Yellow and Green Boxes of The

Decision Channeling Calculator

© David@TechForText.com

 

 

The Code in the Yellow and Green

Boxes of the Spreadsheet Version

© David@TechForText.com

Before reading this subsection, you should carefully examine the yellow and green boxes, on the bottom of the Decision Channeling Calculator.

 

There are a little over 200 of these boxes in the spreadsheet version, and about 100 in the JavaScript version.  In each of these boxes a calculated result is presented.  These calculated results are either the result of addition or taking the square root of a calculated result in an adjacent box.  This is explained in detail on the main webpage under the heading: The Computer Instructions at the End of the Green and Yellow Pathways.

 

On this webpage, a PORTION of the computer code for the calculations from the yellow and green boxes, of both versions of the Decision Channeling Calculator are compared.  The code from the spreadsheet version consists of relatively compact formulas, and the JavaScript version is just the opposite.  The computer code for the spreadsheet version is presented below, and the JavaScript code will follow. © David@TechForText.com

 

SPREADSHEET VERSION

 

 

A PORTION OF THE JAVASCRIPT CODE FOR THE

YELLOW AND GREEN BOXES OF THE

DECISION CHANNELING CALCULATOR

© David@TechForText.com

var c1N69=(((c1N67)+(c1O31)));var c1N71=(((c1N69)+(c1O31)));var c1N73=(((c1N71)+(c1O31)));var c1N75=(((c1N73)+(c1O31)));var c1N77=(((c1N75)+(c1O31)));var c1N79=(((c1N77)+(c1O31)));var c1N81=(((c1N79)+(c1O31)));var c1N83=(((c1N81)+(c1O31)));var c1N85=(((c1N83)+(c1O31)));var c1N87=(((c1N85)+(c1O31)));var c1N89=(((c1N87)+(c1O31)));var c1N91=(((c1N89)+(c1O31)));var c1N93=(((c1N91)+(c1O31)));var c1N95=(((c1N93)+(c1O31)));var c1N97=(((c1N95)+(c1O31)));var c1N99=(((c1N97)+(c1O31)));var c1N101=(((c1N99)+(c1O31)));var c1N103=(((c1N101)+(c1O31)));var c1N105=(((c1N103)+(c1O31)));var c1N107=(((c1N105)+(c1O31)));var c1N109=(((c1N107)+(c1O31)));var c1N111=(((c1N109)+(c1O31)));var c1N113=(((c1N111)+(c1O31)));var c1N115=(((c1N113)+(c1O31)));var c1N117=(((c1N115)+(c1O31)));var c1N119=(((c1N117)+(c1O31)));var c1N121=(((c1N119)+(c1O31)));var c1N123=(((c1N121)+(c1O31)));var c1N125=(((c1N123)+(c1O31)));var c1N127=(((c1N125)+(c1O31)));var c1N129=(((c1N127)+(c1O31)));var c1N131=(((c1N129)+(c1O31)));var c1N133=(((c1N131)+(c1O31)));var c1F31=(c1E30);var c1S33=(Math.pow((c1N33),(0.5)));var c1E34=(((c1F31)+(c1E30)));var c1S35=(Math.pow((c1N35),(0.5)));var c1E36=(((c1E34)+(c1E30)));var c1S37=(Math.pow((c1N37),(0.5)));var c1E38=(((c1E36)+(c1E30)));

 var c1S39=(Math.pow((c1N39),(0.5)));var c1E40=(((c1E38)+(c1E30)));var c1S41=(Math.pow((c1N41),(0.5)));var c1E42=(((c1E40)+(c1E30)));var c1S43=(Math.pow((c1N43),(0.5)));var c1E44=(((c1E42)+(c1E30)));var c1S45=(Math.pow((c1N45),(0.5)));var c1E46=(((c1E44)+(c1E30)));var c1S47=(Math.pow((c1N47),(0.5)));var c1E48=(((c1E46)+(c1E30)));var c1S49=(Math.pow((c1N49),(0.5)));var c1E50=(((c1E48)+(c1E30)));var c1S51=(Math.pow((c1N51),(0.5)));var c1E52=(((c1E50)+(c1E30)));var c1S53=(Math.pow((c1N53),(0.5)));var c1E54=(((c1E52)+(c1E30)));var c1S55=(Math.pow((c1N55),(0.5)));var c1E56=(((c1E54)+(c1E30)));var c1S57=(Math.pow((c1N57),(0.5)));var c1E58=(((c1E56)+(c1E30)));var c1S59=(Math.pow((c1N59),(0.5)));var c1E60=(((c1E58)+(c1E30)));var c1S61=(Math.pow((c1N61),(0.5)));var c1E62=(((c1E60)+(c1E30)));var c1S63=(Math.pow((c1N63),(0.5)));var c1E64=(((c1E62)+(c1E30)));var c1S65=(Math.pow((c1N65),(0.5)));var c1E66=(((c1E64)+(c1E30)));var c1S67=(Math.pow((c1N67),(0.5)));var c1E68=(((c1E66)+(c1E30)));var c1S69=(Math.pow((c1N69),(0.5)));var c1E70=(((c1E68)+(c1E30)));var c1S71=(Math.pow((c1N71),(0.5)));var c1E72=(((c1E70)+(c1E30)));var c1S73=(Math.pow((c1N73),(0.5)));var c1E74=(((c1E72)+(c1E30)));var c1S75=(Math.pow((c1N75),(0.5)));var c1E76=(((c1E74)+(c1E30)));

 var c1S77=(Math.pow((c1N77),(0.5)));var c1E78=(((c1E76)+(c1E30)));var c1S79=(Math.pow((c1N79),(0.5)));var c1E80=(((c1E78)+(c1E30)));var c1S81=(Math.pow((c1N81),(0.5)));var c1E82=(((c1E80)+(c1E30)));var c1S83=(Math.pow((c1N83),(0.5)));var c1E84=(((c1E82)+(c1E30)));var c1S85=(Math.pow((c1N85),(0.5)));var c1E86=(((c1E84)+(c1E30)));var c1S87=(Math.pow((c1N87),(0.5)));var c1E88=(((c1E86)+(c1E30)));var c1S89=(Math.pow((c1N89),(0.5)));var c1E90=(((c1E88)+(c1E30)));var c1S91=(Math.pow((c1N91),(0.5)));var c1E92=(((c1E90)+(c1E30)));var c1S93=(Math.pow((c1N93),(0.5)));var c1E94=(((c1E92)+(c1E30)));var c1S95=(Math.pow((c1N95),(0.5)));var c1E96=(((c1E94)+(c1E30)));var c1S97=(Math.pow((c1N97),(0.5)));var c1E98=(((c1E96)+(c1E30)));var c1S99=(Math.pow((c1N99),(0.5)));var c1E100=(((c1E98)+(c1E30)));var c1S101=(Math.pow((c1N101),(0.5)));var c1E102=(((c1E100)+(c1E30)));var c1S103=(Math.pow((c1N103),(0.5)));var c1E104=(((c1E102)+(c1E30)));var c1S105=(Math.pow((c1N105),(0.5)));var c1E106=(((c1E104)+(c1E30)));var c1S107=(Math.pow((c1N107),(0.5)));var c1E108=(((c1E106)+(c1E30)));var c1S109=(Math.pow((c1N109),(0.5)));var c1E110=(((c1E108)+(c1E30)));var c1S111=(Math.pow((c1N111),(0.5)));var c1E112=(((c1E110)+(c1E30)));var c1S113=(Math.pow((c1N113),(0.5)));

 

 

The Entire Computer Code From the JavaScript

Version of the Decision Channeling Calculator

© David@TechForText.com

 

If you want to examine all of the code from the decision channeling calculator, left click on these words.  This will take you to another webpage.

 

 

If you have not seen the main webpage,

for the Decision Channeling Calculator, you

can view it by left clicking on these words

 

The online JavaScript version of the Calculator

can be accessed by left clicking on these words.

 

To return to the top of this

webpage left click on these words