Skip to content

Instantly share code, notes, and snippets.

@Fruitfella
Created July 16, 2017 15:18
Show Gist options
  • Save Fruitfella/fd9af4d8e6747c7be1c7b3e3a7b420f4 to your computer and use it in GitHub Desktop.
Save Fruitfella/fd9af4d8e6747c7be1c7b3e3a7b420f4 to your computer and use it in GitHub Desktop.
Digit analizer created by Oleksandr Kovalov
<xml xmlns="http://www.w3.org/1999/xhtml" collection="true">
<block type="procedures_defnoreturn" id="#%p[Gr=LCU7Fn}Ann-;]" collapsed="true">
<field name="NAME">initVars</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="cN_X-dMc{I/]/~b*|:P5">
<field name="VAR">LastDigitStatsList</field>
<value name="VALUE">
<block type="lists_repeat" id="Q;6Eb4gj+0YV6w52^*5F">
<value name="ITEM">
<block type="math_number" id=":4@ofT:7iJT8-]{(vw8i">
<field name="NUM">0</field>
</block>
</value>
<value name="NUM">
<shadow type="math_number" id="]]s!5rQ.I/Bp}.H/)y#D">
<field name="NUM">5</field>
</shadow>
<block type="math_number" id="/sOS@2uVrwP($gc)BA}d">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="x6EF4XSBC?(w!w2S[e]H">
<field name="VAR">fractionPartLength</field>
<value name="VALUE">
<block type="math_number" id="?{V?8.TBVPvZT@CQA04a">
<field name="NUM">3</field>
</block>
</value>
<next>
<block type="variables_set" id="$zQ++S,Zc%@BR%D0Q%:h">
<field name="VAR">fractionDelemiter</field>
<value name="VALUE">
<block type="text" id="O+InE.lF]J6)#a6QOk{5">
<field name="TEXT">.</field>
</block>
</value>
<next>
<block type="variables_set" id="=[OxP}gw~UK@w02T4VWX">
<field name="VAR">amountOfTicksToCheck</field>
<value name="VALUE">
<block type="math_number" id="U0K=J?Gf2~80B:atAF(K">
<field name="NUM">20</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="I=sv57%kM)tF3rb*kMlG" collapsed="true">
<mutation>
<arg name="__inputTickList"></arg>
<arg name="__inputNeededLength"></arg>
</mutation>
<field name="NAME">updateLastDigitStats</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="%@=VQV._5298FUXJ=m*,">
<field name="VAR">LastDigitStatsList</field>
<value name="VALUE">
<block type="lists_repeat" id=",;6C}%N)fJlQb7t;7j50">
<value name="ITEM">
<block type="math_number" id="RsKgkf)X85eF]]F`Cmu+">
<field name="NUM">0</field>
</block>
</value>
<value name="NUM">
<shadow type="math_number" id="]]s!5rQ.I/Bp}.H/)y#D">
<field name="NUM">5</field>
</shadow>
<block type="math_number" id="*,3zd.]qY_,6XuMEB]=Q">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="d:uba]JHdz^tbB(pC68s">
<field name="VAR">__chunkedList</field>
<value name="VALUE">
<block type="lists_getSublist" id="mSuN(9^Rf):S(sK=jPXY">
<mutation at1="true" at2="true"></mutation>
<field name="WHERE1">FROM_END</field>
<field name="WHERE2">FROM_END</field>
<value name="LIST">
<block type="variables_get" id="/yYIPTPE,AuR:vU1F6ix">
<field name="VAR">__inputTickList</field>
</block>
</value>
<value name="AT1">
<block type="variables_get" id="4kN/PET.Gl?J0bG7X62-">
<field name="VAR">__inputNeededLength</field>
</block>
</value>
<value name="AT2">
<block type="math_number" id="5^pg8QGr#$z)W!(m]3y8">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_forEach" id="]6)c~NaljBxw|~*1rARY">
<field name="VAR">i</field>
<value name="LIST">
<block type="variables_get" id="/a6UKJIBe6,jGV[zZ5QY">
<field name="VAR">__chunkedList</field>
</block>
</value>
<statement name="DO">
<block type="variables_set" id="{_BH@ASe~CffO_o;`Rmn">
<field name="VAR">__lastDigitOfTheTick</field>
<value name="VALUE">
<block type="procedures_callreturn" id="y~laiMyAZ.PL8Qvwkf)f">
<mutation name="getLastDigitOfTheTick">
<arg name="__inputTickNumber"></arg>
</mutation>
<value name="ARG0">
<block type="variables_get" id="p-.ajHdXPFQG~fkUo{{m">
<field name="VAR">i</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="Qm/HC;+.oJ7FY3vN88BW">
<field name="VAR">__statsElement</field>
<value name="VALUE">
<block type="lists_getIndex" id="I?[gy;y24!aoWf3Ku;sa">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="m2aE*{GD1YH}6t4m/=i,">
<field name="VAR">LastDigitStatsList</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="MgcZ;e9XD^hw7^6em[kD">
<field name="VAR">__lastDigitOfTheTick</field>
</block>
</value>
</block>
</value>
<next>
<block type="math_change" id="22*{BZhQj(#xqo7-d)Mf">
<field name="VAR">__statsElement</field>
<value name="DELTA">
<shadow type="math_number" id="p@`Kq`g_?aDqv]m|BB?Z">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="Dcx+zF4LzyUB8qDu6ia1">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="lists_setIndex" id="iF94!~s_}ukmpPy_0Ci:">
<mutation at="true"></mutation>
<field name="MODE">SET</field>
<field name="WHERE">FROM_START</field>
<value name="LIST">
<block type="variables_get" id="wub}^bt|%03Z%l7yGdbd">
<field name="VAR">LastDigitStatsList</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="vvCmNiucS!DuSVp(chSI">
<field name="VAR">__lastDigitOfTheTick</field>
</block>
</value>
<value name="TO">
<block type="variables_get" id="zy[o,veawWF{5~-r0p}U">
<field name="VAR">__statsElement</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="procedures_defreturn" id="jo~=C?Ye~BV1t;MS_RQ+" collapsed="true">
<mutation>
<arg name="__inputTickNumber"></arg>
</mutation>
<field name="NAME">getLastDigitOfTheTick</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="U|:B_1QRX:DsGd4ik5JD">
<field name="VAR">__stringValueOfTheTick</field>
<value name="VALUE">
<block type="text_join" id="?Z/HNHA|A,jnk3g:*gvw">
<mutation items="1"></mutation>
<value name="ADD0">
<block type="variables_get" id="-Qess*.+1~k8Pb+@;K(q">
<field name="VAR">__inputTickNumber</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="xcx^3,85|]Sd@el+)(Xy">
<field name="VAR">__delemiterPosition</field>
<value name="VALUE">
<block type="text_indexOf" id="ad,BtZsEGsH{$[+tBgRs">
<field name="END">LAST</field>
<value name="VALUE">
<block type="variables_get" id="Bd.tkE^!`JD7[eyM:U_k">
<field name="VAR">__stringValueOfTheTick</field>
</block>
</value>
<value name="FIND">
<shadow type="text" id="=tO.XnTe6uZgK5_(0T5x">
<field name="TEXT">abc</field>
</shadow>
<block type="variables_get" id="mu*gX{d+dS9JeP#8@3n(">
<field name="VAR">fractionDelemiter</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="C(*mA-E3OHx|sdYxb}54">
<field name="VAR">__fractionPart</field>
<value name="VALUE">
<block type="text_getSubstring" id="gf92wcF/)d:t!Mo:q6=6">
<mutation at1="true" at2="true"></mutation>
<field name="WHERE1">FROM_START</field>
<field name="WHERE2">FROM_END</field>
<value name="STRING">
<block type="variables_get" id="Pcj$d}QbghqJugT4jj_K">
<field name="VAR">__stringValueOfTheTick</field>
</block>
</value>
<value name="AT1">
<block type="variables_get" id="liJoF_akW2`O0pY/UUb@">
<field name="VAR">__delemiterPosition</field>
</block>
</value>
<value name="AT2">
<block type="math_number" id="@iM0l8ando`et#+L$u.O">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="eI{i8p(/8tyv{}Qu]bi7">
<field name="VAR">__stringLastDigit</field>
<value name="VALUE">
<block type="text_charAt" id="/,+i]rjn.yL]$Y!P4Fa|">
<mutation at="true"></mutation>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="$87popp~sG51-$mhxrr9">
<field name="VAR">__stringValueOfTheTick</field>
</block>
</value>
<value name="AT">
<block type="text_length" id="ioR{CWJKnoyrg8Fe5G:n">
<value name="VALUE">
<shadow type="text" id="sSqpClJ,CzS5!qA#,]c6">
<field name="TEXT">abc</field>
</shadow>
<block type="variables_get" id="`7UkEkNHt:ElZd+(-(.5">
<field name="VAR">__stringValueOfTheTick</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="oKFfKq;,fLRd4D}uCYZx">
<value name="IF0">
<block type="logic_compare" id="rS;/[email protected]|x|0_}mwn:">
<field name="OP">LT</field>
<value name="A">
<block type="text_length" id="6U7?D._qxjS5Mgf8mc6N">
<value name="VALUE">
<shadow type="text" id="fP;F+$EyWsWL=I+uP,eN">
<field name="TEXT">abc</field>
</shadow>
<block type="variables_get" id="Xm}++wKmz9]()uB[0$Q=">
<field name="VAR">__fractionPart</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="variables_get" id="n{Z=sY?o*[YE((+#PT46">
<field name="VAR">fractionPartLength</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="1GtY~#P4{LMZToY=D,qm">
<field name="VAR">__stringLastDigit</field>
<value name="VALUE">
<block type="math_number" id="|8a%mU7fWt~je.^i-g4j">
<field name="NUM">0</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="RETURN">
<block type="variables_get" id="z|L5oY+Ioe0l!}yUU8k3">
<field name="VAR">__stringLastDigit</field>
</block>
</value>
</block>
<block type="procedures_defnoreturn" id=")KTr?]3+jd+.kL[NR/]m" collapsed="true">
<mutation>
<arg name="__inputListToDetermineMaxAndMin"></arg>
</mutation>
<field name="NAME">getLastDigitsMaxAndMinValues</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="`h)24-6VGf@[e#sIUKF3">
<field name="VAR">MaxInTheLastDigitStats</field>
<value name="VALUE">
<block type="math_number" id="*U`mXOve!5K6DQ8-)gDS">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set" id="rK24]*RUjfAX_EesF+Xv">
<field name="VAR">MinInTheLastDigitStats</field>
<value name="VALUE">
<block type="math_number" id="eW-R1o5;,?Az5Ov(U,{@">
<field name="NUM">1000</field>
</block>
</value>
<next>
<block type="controls_for" id=":Y|qjQB.b~qkuR#$jPS=">
<field name="VAR">j</field>
<value name="FROM">
<block type="math_number" id="l(z$Fu8qGU.6P:Rc4q[2">
<field name="NUM">0</field>
</block>
</value>
<value name="TO">
<block type="math_number" id="zqDIiZt2k_n(MF|Tj0h|">
<field name="NUM">9</field>
</block>
</value>
<value name="BY">
<block type="math_number" id="0,T~Ew.*T@qUS-]$dEXi">
<field name="NUM">1</field>
</block>
</value>
<statement name="DO">
<block type="variables_set" id="mtu@qb31*mnbmL1=ukc3">
<field name="VAR">__statsElement</field>
<value name="VALUE">
<block type="lists_getIndex" id="Ln{uY%6vU5I!Q:*p_mlP">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="Rk-E$[xHiA]Eh-7{/FJp">
<field name="VAR">__inputListToDetermineMaxAndMin</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="E7UOxO|$Q0%!::U^703@">
<field name="VAR">j</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="5-EW--~(*fhvE/ejz]1i">
<value name="IF0">
<block type="logic_compare" id="@gn=da~?}e0?kw0*hAQ8">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="d=|rlW}BNFP6al^7u8fH">
<field name="VAR">__statsElement</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="nv#|F3zVB8lvUgN,7LpX">
<field name="VAR">MinInTheLastDigitStats</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id=":Wi@Qg{A)?u#4RxdDEa}">
<field name="VAR">MinInTheLastDigitStats</field>
<value name="VALUE">
<block type="variables_get" id="g#Z]7OB6+MRU^@G~PK[[">
<field name="VAR">__statsElement</field>
</block>
</value>
<next>
<block type="variables_set" id=";jY/yuv-6mD`L?kmWGVT">
<field name="VAR">MinStatsIdx</field>
<value name="VALUE">
<block type="variables_get" id="VIL3tKqw|~mt_[XY0h(q">
<field name="VAR">j</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="2DRbU)VSeW:svpu@6_q@">
<value name="IF0">
<block type="logic_compare" id="hAwvtk}St=;4xX@,gKI`">
<field name="OP">GT</field>
<value name="A">
<block type="variables_get" id="JoVYBT;S~|DLXcQ2xu{L">
<field name="VAR">__statsElement</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="3[e@78G:G[+iSw{A:=+Z">
<field name="VAR">MaxInTheLastDigitStats</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="L^(Zb^HB}0hy.OU`2ToC">
<field name="VAR">MaxInTheLastDigitStats</field>
<value name="VALUE">
<block type="variables_get" id="+L0[QSvN(7~6/HsT.[GS">
<field name="VAR">__statsElement</field>
</block>
</value>
<next>
<block type="variables_set" id="dxjV.LOfWR,^0:sdA)r2">
<field name="VAR">MaxStatsIdx</field>
<value name="VALUE">
<block type="variables_get" id="+n9BJl3ivcV0nM30Nrk%">
<field name="VAR">j</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</xml>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment