<snapdata remixID="12874527"><project name="cloud-database-utilities" app="Snap! 9.0, https://snap.berkeley.edu" version="2"><notes>now with bug fixes&#xD;improvement of life feauchers&#xD;making this the best cloud database in all of snap</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAoKADAAQAAAABAAAAeAAAAAAeaS0RAAADM0lEQVR4Ae3XMUqcARSF0X9CrN2Cq3ENgo2FLsP1uBI3YytimahdIAZuuOEm5Ezn+HhvPH444+nb2+PwIDAS+DK66yyBDwEBCmEqIMApv+MC1MBUQIBTfscFqIGpgACn/I4LUANTAQFO+R0XoAamAgKc8jsuQA1MBQQ45XdcgBqYCghwyu+4ADUwFRDglN9xAWpgKiDAKb/jAtTAVECAU37HBaiBqYAAp/yOC1ADUwEBTvkdF6AGpgICnPI7LkANTAUEOOV3XIAamAoIcMrvuAA1MBUQ4JTfcQFqYCogwCm/4wLUwFRAgFN+xwWogamAAKf8jgtQA1MBAU75HRegBqYCApzyOy5ADUwFBDjld1yAGpgKCHDK77gANTAVEOCU33EBamAqIMApv+MC1MBUQIBTfscFqIGpgACn/I4LUANTga/T63/x8YeHh+P5+fm4vLw8Li4u/uJX+m+/tNO3t8e//SP8mVf/8vJy3N3dHa+vr8fT09NxfX19nE6n4/b29jg7O/szR//DrQL8xS/98fHxuL+/P87Pz3+Yeo/y5ubm47mrq6sfvueLTMBnwMzLdFnAX8BPQH/2Fvw++v627C34E7TfeFqAn6D5J+QTmPLTAiyDWpcJ+AyYeZkuCwiwDGpdJiDAzMt0WUCAZVDrMgEBZl6mywICLINalwkIMPMyXRYQYBnUukxAgJmX6bKAAMug1mUCAsy8TJcFBFgGtS4TEGDmZbosIMAyqHWZgAAzL9NlAQGWQa3LBASYeZkuCwiwDGpdJiDAzMt0WUCAZVDrMgEBZl6mywICLINalwkIMPMyXRYQYBnUukxAgJmX6bKAAMug1mUCAsy8TJcFBFgGtS4TEGDmZbosIMAyqHWZgAAzL9NlAQGWQa3LBASYeZkuCwiwDGpdJiDAzMt0WUCAZVDrMgEBZl6mywICLINalwkIMPMyXRYQYBnUukxAgJmX6bKAAMug1mUCAsy8TJcFBFgGtS4TEGDmZbosIMAyqHWZgAAzL9NlAQGWQa3LBASYeZkuCwiwDGpdJiDAzMt0WUCAZVDrMgEBZl6mywICLINalwkIMPMyXRYQYBnUukzgO7RmRdVFbOJYAAAAAElFTkSuQmCC</thumbnail><scenes select="1"><scene name="cloud-database-utilities"><notes>now with bug fixes&#xD;improvement of life feauchers&#xD;making this the best cloud database in all of snap</notes><palette><category name="cloud data" color="0,116,143,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="set variable in cloud database %&apos;variable&apos; to %&apos;num&apos;" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%s"></input></inputs><script><custom-block s="scan for variable in cloud database named %txt"><block var="variable"/></custom-block><custom-block s="set item x %n y %n of cloud database to %n"><block var="variable at x"/><block var="variable at y"/><block var="num"/></custom-block></script></block-definition><block-definition s="create variable %&apos;variable&apos; in cloud database" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>var x</l><l>var y</l><l>x</l><l>y</l><l>has var position</l></list></block><block s="doSetVar"><l>has var position</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l>y</l><l>1</l></block><block s="doRepeat"><block var="database size"/><script><block s="doSetVar"><l>x</l><l>1</l></block><block s="doRepeat"><block var="database size"/><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="has var position"/><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><script><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block var="x"/><block s="reportListItem"><block var="y"/><block var="variables in cloud database"/></block></block><l></l></list></block><script><block s="doSetVar"><l>has var position</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="doSetVar"><l>var x</l><block var="x"/></block><block s="doSetVar"><l>var y</l><block var="y"/></block></script><list></list></block></script><list></list></block><block s="doChangeVar"><l>x</l><l>1</l></block></script></block><block s="doChangeVar"><l>y</l><l>1</l></block></script></block><block s="doReplaceInList"><block var="var x"/><block s="reportListItem"><block var="var y"/><block var="variables in cloud database"/></block><block var="variable"/></block><block s="doAddToList"><block var="variable"/><block var="cloud variables"/></block></script></block-definition><block-definition s="item x %&apos;x&apos; y %&apos;y&apos; of cloud database" type="reporter" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportListItem"><block var="x"/><block s="reportListItem"><block var="y"/><custom-block s="var %s"><l>cloud data</l></custom-block></block></block></block></script></block-definition><block-definition s="set item x %&apos;x&apos; y %&apos;y&apos; of cloud database to %&apos;answer&apos;" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReplaceInList"><block var="x"/><block s="reportListItem"><block var="y"/><custom-block s="var %s"><l>cloud data</l></custom-block></block><block var="answer"/></block></script></block-definition><block-definition s="setup cloud database named %&apos;name&apos; with size %&apos;size&apos;" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>database name</l></list></block><block s="doSetVar"><l>database name</l><block s="reportJoinWords"><list><l>cloud database </l><block var="name"/></list></block></block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>cloud data</l></list></custom-block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>variables in cloud database</l></list></custom-block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>database size</l></list></custom-block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>variable at x</l></list></custom-block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>variable at y</l></list></custom-block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>cloud variables</l></list></custom-block><custom-block s="set var %s to %s"><l>cloud data</l><block s="reportReshape"><l></l><list><block var="size"/><block var="size"/></list></block></custom-block><custom-block s="set var %s to %s"><l>variables in cloud database</l><block s="reportReshape"><l></l><list><block var="size"/><block var="size"/></list></block></custom-block><custom-block s="set var %s to %s"><l>database size</l><block var="size"/></custom-block><custom-block s="set var %s to %s"><l>cloud variables</l><block s="reportNewList"><list></list></block></custom-block><custom-block s="$cloudOutline MQTT connect to %s %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><list><l></l></list></custom-block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><block s="reportJoinWords"><list><l>cloud database named</l><l></l><block var="database name"/></list></block><l>start database</l><list><l></l><block s="reportBoolean"><l><bool>true</bool></l></block></list></custom-block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><block s="reportJoinWords"><list><l>cloud database named</l><l></l><block var="database name"/></list></block><block s="reifyScript"><script><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="payload"/><l>start database</l></list></block></block><script><block s="doSetVar"><l>cloud data</l><block var="payload"/></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><block s="reportJoinWords"><list><l>cloud database named</l><l></l><block var="database name"/></list></block><custom-block s="var %s"><l>cloud data</l></custom-block><list><l></l><block s="reportBoolean"><l><bool>true</bool></l></block></list></custom-block></script><list></list></block></script><list><l>payload</l></list></block><list><l></l></list></custom-block></script></block-definition><block-definition s="var %&apos;_name&apos;" type="reporter" category="variables"><comment x="0" y="0" w="178.00000000000003" collapsed="false">This block reports the value of the variable with the name given.&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>pt:o valor de _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></block></script></block-definition><block-definition s="create %&apos;_scope&apos; var %&apos;_names&apos;" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates  new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in &apos;names&apos; list).&#xD;&#xD;If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _&#xD;ca:crea les _ variables _&#xD;es:crear las _ variables _&#xD;de:erstellen _ var _&#xD;</translations><inputs><input type="%s" readonly="true">global<options>global&#xD;sprite&#xD;script</options></input><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block var="_scope"/><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="scan for variable in cloud database named %&apos;variable&apos;" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>x</l><l>y</l><l>variable x</l><l>variable y</l></list></block><block s="doSetVar"><l>x</l><l>1</l></block><block s="doSetVar"><l>y</l><l>1</l></block><block s="doSetVar"><l>variable x</l><l>0</l></block><block s="doSetVar"><l>variable y</l><l>0</l></block><block s="doRepeat"><block var="database size"/><script><block s="doSetVar"><l>x</l><l>0</l></block><block s="doRepeat"><block var="database size"/><script><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><block var="x"/><block s="reportListItem"><block var="y"/><block var="variables in cloud database"/></block></block><block var="variable"/></list></block><script><block s="doSetVar"><l>variable x</l><block var="x"/></block><block s="doSetVar"><l>variable y</l><block var="y"/></block></script><list></list></block><block s="doChangeVar"><l>x</l><l>1</l></block></script></block><block s="doChangeVar"><l>y</l><l>1</l></block></script></block><block s="doIfElse"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block var="variable x"/><l>0</l></list></block><block s="reportVariadicEquals"><list><block var="variable y"/><l>0</l></list></block></list></block><script><block s="show"></block><block s="setEffect"><l><option>ghost</option></l><l>0</l></block><block s="goToLayer"><l><option>front</option></l></block><block s="doForever"><script><block s="doStopThis"><l><option>all but this script</option></l></block><block s="bubble"><block s="reportJoinWords"><list><l>variable </l><block var="variable"/><l>does not exist</l></list></block></block></script></block></script><script><custom-block s="set var %s to %s"><l>variable at x</l><block var="variable x"/></custom-block><custom-block s="set var %s to %s"><l>variable at y</l><block var="variable y"/></custom-block></script></block></script></block-definition><block-definition s="set var %&apos;_name&apos; to %&apos;_value&apos;" type="command" category="variables"><comment x="0" y="0" w="240.4931640625" collapsed="false">This block sets the given value (last input) to the variable named with the name givent (var input).&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>ca:assigna a _ el valor _&#xD;es:asignar a _ el valor _&#xD;pt:altera _ para _&#xD;de:setze var _ auf _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>var_set(name, val)</l><list><block var="_name"/><block var="_value"/></list></block></script></block-definition><block-definition s="change variable in cloud database %&apos;variable&apos; by %&apos;num&apos;" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>old value</l></list></block><custom-block s="scan for variable in cloud database named %txt"><block var="variable"/></custom-block><block s="doSetVar"><l>old value</l><block s="reportListItem"><block var="variable at x"/><block s="reportListItem"><block var="variable at y"/><custom-block s="var %s"><l>cloud data</l></custom-block></block></block></block><custom-block s="set item x %n y %n of cloud database to %n"><block var="variable at x"/><block var="variable at y"/><block s="reportVariadicSum"><list><block var="old value"/><block var="num"/></list></block></custom-block></script></block-definition><block-definition s="$cloudOutline MQTT connect to %&apos;broker&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="other" helper="true"><comment x="0" y="0" w="416.6666666666666" collapsed="false">Connect to a broker&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1. username (some brokers need this)&#xD;2. password (some brokers need this)&#xD;3. keepalive (default time is 60 seconds but some brokers need a shorter time)&#xD;4. connection callback (ringed set of scripts to be run when connection is made or remade)&#xD;&#xD;Note: The connection callback doesn&apos;&apos;t have to be the 4th option - it just has to be the last (or only) option.&#xD;&#xD;ADVANCED: The brokers offered in the menu are accessed using default ports and  basepaths (if needed).  If accessing other brokers, the complete urls should be formed like this:&#xD;&#xD;siteURL:port/basepath &#xD;e.g mqtt.eclipseprojects.io:443/mqtt&#xD;&#xD;It is possible to have more than one connection to the same broker, for instance, using two different user/pass accounts simultaneously. To do this, add a connection id at the end of the broker:&#xD;&#xD;e.g mqtt.eclipseprojects.io:443/mqtt|1&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%mult%s"></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doDeclareVariables"><list><l>connection status</l><l>callback</l></list></block><block s="doSetVar"><l>connection status</l><l>connecting</l></block><block s="doSetVar"><l>callback</l><l></l></block><block s="doIf"><block s="reportIsA"><block s="reportListItem"><l><option>last</option></l><block var="options"/></block><l><option>command</option></l></block><script><block s="doSetVar"><l>callback</l><block s="reportListItem"><l><option>last</option></l><block var="options"/></block></block><block s="doDeleteFromList"><l><option>last</option></l><block var="options"/></block></script><list></list></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>username</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>password</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>keepalive</l><block s="reportListItem"><l>3</l><block var="options"/></block></list></block></list></block></block></block><block s="doApplyExtension"><l>mqt_connect(broker,callback,options)</l><list><block var="broker"/><block var="callback"/><block var="options"/></list></block><block s="doWaitUntil"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="connection status"/><l>connecting</l></list></block></block></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="connection status"/><l>connected</l></list></block></block><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="connection status"/></list></block></script><list></list></block></script></block-definition><block-definition s="$cloudOutline MQTT publish to %&apos;broker&apos; topic %&apos;topic&apos; payload %&apos;payload&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="other" helper="true"><comment x="0" y="0" w="200" collapsed="false">Publish a message to an MQTT broker&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1. qos (quality of service 0,1 or 2)&#xD;2. retain flag (boolean)&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name</input><input type="%mlt">hello</input><input type="%mult%s"></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>qos</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>retain</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></block></list></block></block></block><block s="doIf"><block s="reportIsA"><block var="payload"/><l><option>list</option></l></block><script><block s="doSetVar"><l>payload</l><block s="reportListAttribute"><l><option>json</option></l><block var="payload"/></block></block></script><list></list></block><block s="doIf"><block s="reportIsA"><block var="payload"/><l><option>number</option></l></block><script><block s="doSetVar"><l>payload</l><block s="reportJoinWords"><list><block var="payload"/></list></block></block></script><list></list></block><block s="doApplyExtension"><l>mqt_pub(broker,topic,payload,options)</l><list><block var="broker"/><block var="topic"/><block var="payload"/><block var="options"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT subscribe to %&apos;broker&apos; topic %&apos;topic&apos; $nl on each message run %&apos;callback&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="other" helper="true"><comment x="0" y="0" w="239.99999999999977" collapsed="false">Subscribe to a topic on a broker&#xD;&#xD;Make sure you have already run an MQTT connect block before using this one&#xD;&#xD;You should add a script to be run inside he grey ring.&#xD;&#xD;It will be run each time a message is received&#xD;&#xD;If you click on the arrow on the grey ring twice, you can use #1 and #2 inside your script.&#xD;&#xD;#1 will contain the received payload&#xD;&#xD;#2 will contain the received topic name&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;There is only 1 option at present&#xD;1. Binary mode (boolean) If true, payload returned as plain binary byte string.  Default condition (false) it is returned as UTF text string</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name</input><input type="%cmdRing"></input><input type="%mult%s"></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>mode</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block></list></block></block></block><block s="doApplyExtension"><l>mqt_sub(broker,topic,callback,options)</l><list><block var="broker"/><block var="topic"/><block var="callback"/><block var="options"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT unsubscribe from %&apos;broker&apos; topic %&apos;topic&apos;" type="command" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doApplyExtension"><l>mqt_unsub(broker,topic)</l><list><block var="broker"/><block var="topic"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT disconnect from %&apos;broker&apos;" type="command" category="other" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s">all<options>all&#xD;broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doApplyExtension"><l>mqt_disconnect(broker)</l><list><block var="broker"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT response %&apos;broker&apos; topic %&apos;topic&apos; $nl reply %&apos;reply&apos; $nl $options-1-192-192-192 %&apos;$options&apos;" type="command" category="other" helper="true"><comment x="0" y="0" w="178" collapsed="false">There is only 1 option at present&#xD;1. Binary mode (boolean) If true, payload returned as plain binary byte string.  Default condition (false) it is returned as UTF text string</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name/#</input><input type="%repRing"></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>resp</l><l>callbackTopic</l><l>error</l></list></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><block var="broker"/><block var="topic"/><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportApplyExtension"><l>txt_indexof(sub, txt)</l><list><l>/@</l><block var="received topic"/></list></block><l>0</l></list></block><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block s="evaluate"><block var="reply"/><list><block var="received payload"/><block var="received topic"/></list></block></block></script><list></list></block><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block s="evaluate"><block var="reply"/><list></list></block></block></script><list></list></block><block var="error"/></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block><block s="doSetVar"><l>callbackTopic</l><block s="reportListItem"><l><option>last</option></l><block s="reportTextSplit"><block var="received topic"/><l>@</l></block></block></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><block var="broker"/><block var="callbackTopic"/><block var="resp"/><list><l></l></list></custom-block></script><list></list></block></script><list><l>received payload</l><l>received topic</l></list></block><list><block s="reportListItem"><l>1</l><block var="$options"/></block></list></custom-block></script></block-definition><block-definition s="$cloudOutline MQTT request %&apos;broker&apos; topic %&apos;topic&apos; $nl response topic %&apos;rtopic&apos; payload %&apos;payload&apos; $nl on response run %&apos;callback&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="other" helper="true"><comment x="0" y="0" w="193" collapsed="false">The options are not required but can be filled if needed.&#xD;&#xD;1. Binary mode (boolean) If true, payload returned as plain binary byte string.  Default condition (false) it is returned as UTF text string&#xD;&#xD;2. Inform response topic (boolean): If true, the response topic is added at the end of the call topic after @ sign. The default condition (true) response topic is added.</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name</input><input type="%s">name2</input><input type="%mlt">hello</input><input type="%cmdRing"></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>error</l><l>informTopic</l><l>topicCall</l></list></block><block s="doSetVar"><l>informTopic</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="options"/></block><l><option>Boolean</option></l></block><block s="reportListItem"><l>2</l><block var="options"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></block></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block><block s="reifyScript"><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doRun"><block var="callback"/><list><block var="received payload"/><block var="received topic"/></list></block></script><list></list></block><block s="reifyScript"><script><block s="doRun"><block var="callback"/><list></list></block></script><list></list></block><block var="error"/></list></block></script><list><l>received payload</l><l>received topic</l></list></block><list><block s="reportListItem"><l>1</l><block var="options"/></block></list></custom-block><block s="doIfElse"><block var="informTopic"/><script><block s="doSetVar"><l>topicCall</l><block s="reportJoinWords"><list><block var="topic"/><l>/</l><block s="reportJoinWords"><list><l>@</l><block var="rtopic"/></list></block></list></block></block></script><script><block s="doSetVar"><l>topicCall</l><block var="topic"/></block></script></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><block var="broker"/><block var="topicCall"/><block var="payload"/><list><l></l></list></custom-block></script></block-definition><block-definition s="$cloudOutline MQTT example response reporter payload %&apos;payload&apos; topic %&apos;topic&apos;" type="reporter" category="other" helper="true"><comment x="0" y="0" w="90" collapsed="false">This is a simple echo example.&#xD;Topic can be used to filter the response.</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">hello</input><input type="%txt">name</input></inputs><script><block s="doReport"><block var="payload"/></block></script></block-definition><block-definition s="$cloudOutline MQTT request %&apos;broker&apos; topic %&apos;topic&apos; $nl response topic %&apos;rtopic&apos; payload %&apos;payload&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="reporter" category="other" helper="true"><comment x="0" y="0" w="343" collapsed="false">The response topic should be a unique value for each call e.g. use timer&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1.  Timeout value - default is 3 seconds&#xD;&#xD;2.  Binary mode (boolean) If true, payload returned as plain binary byte string.  Default condition (false) it is returned as UTF text string&#xD;&#xD;3.  Inform response topic (boolean): If true, the response topic is added at the end of the call topic after @ sign. The default condition (true) response topic is added.</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net</options></input><input type="%s">name</input><input type="%s">name2</input><input type="%mlt">hello</input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>resp</l><l>semaphore</l><l>timer0</l><l>timeout</l><l>informTopic</l><l>topicCall</l></list></block><block s="doSetVar"><l>semaphore</l><l>0</l></block><block s="doSetVar"><l>timeout</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="options"/></block><l><option>number</option></l></block><block s="reportListItem"><l>1</l><block var="options"/></block><l>3</l></block></block><block s="doSetVar"><l>informTopic</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>3</l><block var="options"/></block><l><option>Boolean</option></l></block><block s="reportListItem"><l>3</l><block var="options"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></block></block><block s="doSetVar"><l>resp</l><l>timeout</l></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block var="received payload"/></block><block s="doSetVar"><l>semaphore</l><l>1</l></block></script><list><l>received payload</l><l>received topic</l></list></block><list><block s="reportListItem"><l>2</l><block var="options"/></block></list></custom-block><block s="doIfElse"><block var="informTopic"/><script><block s="doSetVar"><l>topicCall</l><block s="reportJoinWords"><list><block var="topic"/><l>/</l><block s="reportJoinWords"><list><l>@</l><block var="rtopic"/></list></block></list></block></block></script><script><block s="doSetVar"><l>topicCall</l><block var="topic"/></block></script></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><block var="broker"/><block var="topicCall"/><block var="payload"/><list><l></l></list></custom-block><block s="doSetVar"><l>timer0</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="doWaitUntil"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block var="semaphore"/><l>1</l></list></block><block s="reportVariadicGreaterThan"><list><block s="reportDifference"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="timer0"/></block><block s="reportVariadicProduct"><list><block var="timeout"/><l>1000</l></list></block></list></block></list></block></block><custom-block s="$cloudOutline MQTT unsubscribe from %s topic %s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block></custom-block><block s="doReport"><block var="resp"/></block></script></block-definition><block-definition s="MQTT Extension Examples" type="command" category="other" helper="true"><comment x="0" y="0" w="277" collapsed="false">Open (edit) this block to look at examples how to use the MQTT Extension blocks&#xD;&#xD;Background documentation:&#xD;https://github.com/pixavier/mqtt4snap&#xD;&#xD;Last source code version (mqtt.xml and mqttExtension.js):&#xD;https://gitlab.com/cymplecy/Snap/-/tree/master/libraries</comment><header></header><code></code><translations></translations><inputs></inputs><scripts><script x="24.333333333333485" y="371.8666666666658"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><l>hello</l><list><l></l></list></custom-block></script><script x="22.333333333333485" y="271.19999999999976"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>topic</l></list></block><list><l></l></list></custom-block></script><comment x="525.9999999999995" y="140.2" w="191" collapsed="false">To execute the examples, single click on blocks, following the corresponding steps.</comment><script x="28" y="1315.0333333333292"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><block s="getTimer"></block><l>hello</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>topic</l></list></block><list><l></l></list></custom-block></script><script x="24.333333333333485" y="1013.2000000000016"><custom-block s="$cloudOutline MQTT response %s topic %s %br reply %repRing %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name/#</l><block s="reifyReporter"><autolambda><custom-block s="$cloudOutline MQTT example response reporter payload %mlt topic %txt"><block var="payload"/><block var="topic"/></custom-block></autolambda><list><l>payload</l><l>topic</l></list></block><list><l></l></list></custom-block></script><script x="28" y="498.6999999999993"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name1</l><block s="reifyScript"><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name2</l><block var="payload"/><list><l></l></list></custom-block></script><list><l>payload</l><l>topic</l></list></block><list><l></l></list></custom-block></script><script x="30" y="633.0333333333344"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name1</l><l>name2</l><l>hello</l><list><l></l><l></l><block s="reportBoolean"><l><bool>false</bool></l></block></list></custom-block><l>2</l></block></script><comment x="487.99999999999955" y="1311.6999999999966" w="224" collapsed="false">Step 2 bis: Send a request (timer acts as idCall) and do not wait for the answer</comment><comment x="487.99999999999955" y="1013.7000000000012" w="220" collapsed="false">Step 1: Activate the responder</comment><comment x="483.66666666666697" y="805.3666666666666" w="224" collapsed="false">Step 2 bis: Send a request and do not wait for the answer</comment><comment x="487" y="495.6999999999983" w="220" collapsed="false">Step 1: Activate the responder as a simple subscription</comment><comment x="484.99999999999955" y="374.1999999999991" w="222" collapsed="false">Step 2: Publish a message</comment><comment x="485.99999999999955" y="293.1999999999993" w="222" collapsed="false">Step 1: Subscribe to a topic</comment><comment x="482.99999999999955" y="215.2" w="223" collapsed="false">Step 0: Connect to the broker</comment><comment x="485" y="635.6999999999996" w="220" collapsed="false">Step 2: Send a request and wait the answer.</comment><script x="24.333333333333485" y="209.2"><custom-block s="$cloudOutline MQTT connect to %s %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><list><l></l></list></custom-block></script><comment x="24.333333333333485" y="152.2000000000001" w="239.99999999999997" collapsed="false">PubSub Hello World!</comment><script x="26.333333333333485" y="1139.1999999999978"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><block s="getTimer"></block><l>hello</l><list><l></l></list></custom-block><l>2</l></block></script><comment x="486.99999999999955" y="1138.6999999999982" w="219.00000000000023" collapsed="false">Step 2: Send a request (timer acts as idCall) and wait for the answer</comment><script x="27" y="803.0333333333335"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name1</l><l>name2</l><l>hello</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>topic</l></list></block><list><l></l><block s="reportBoolean"><l><bool>false</bool></l></block></list></custom-block></script><comment x="29" y="736.6999999999998" w="372.0000000000004" collapsed="false">Asynchronous client-server Hello World! with static response topic (name2)</comment><comment x="25.333333333333485" y="935.2000000000012" w="356.99999999999994" collapsed="false">Synchronous client-server Hello World! with dynamic response topic (timer)</comment><comment x="28" y="431.36666666666673" w="361.99999999999994" collapsed="false">Synchronous client-server Hello World! with static response topic (name2)</comment><comment x="27" y="1243.6999999999966" w="352.0000000000003" collapsed="false">Asynchronous client-server Hello World! with dynamic response topic (timer)</comment></scripts></block-definition><block-definition s="cloud data blocks v3" type="command" category="cloud data"><header></header><code></code><translations></translations><inputs></inputs><scripts><script x="19" y="93.03333333333336"><custom-block s="set variable in cloud database %txt to %s"><l></l><l></l></custom-block></script><script x="20" y="142.03333333333336"><custom-block s="create variable %txt in cloud database"><l></l></custom-block></script><script x="35" y="189.03333333333336"><custom-block s="item x %n y %n of cloud database"><l></l><l></l></custom-block></script><script x="42" y="235.03333333333336"><custom-block s="set item x %n y %n of cloud database to %n"><l></l><l></l><l></l></custom-block></script><script x="37" y="279.03333333333336"><custom-block s="setup cloud database named %txt with size %n"><l></l><l></l></custom-block></script><script x="28" y="321.03333333333336"><custom-block s="scan for variable in cloud database named %txt"><l></l></custom-block></script><script x="30" y="366.03333333333336"><custom-block s="change variable in cloud database %txt by %n"><l></l><l></l></custom-block></script><script x="46.17441406249998" y="415.7000000000001"><custom-block s="variable in cloud database %txt"><l></l></custom-block></script></scripts></block-definition><block-definition s="variable in cloud database %&apos;var&apos;" type="reporter" category="cloud data"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><custom-block s="scan for variable in cloud database named %txt"><block var="var"/></custom-block><block s="doReport"><block s="reportListItem"><block var="variable at x"/><block s="reportListItem"><block var="variable at y"/><block var="cloud data"/></block></block></block></script></block-definition><block-definition s="store key: %&apos;key&apos; value: %&apos;value&apos; in browser" type="command" category="other" helper="true"><header></header><code></code><translations>ca:desa clau: _ amb valor: _ al navegador&#xD;</translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>db_store(key, val)</l><list><block var="key"/><block var="value"/></list></block></script></block-definition><block-definition s="stored data in browser" type="reporter" category="other" helper="true"><header></header><code></code><translations>ca:dades desades al navegador&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>db_getall</l><list></list></block></block></script></block-definition><block-definition s="remove key: %&apos;key&apos; in browser" type="command" category="other" helper="true"><header></header><code></code><translations>ca:esborra clau: _ del navegador&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>db_remove(key)</l><list><block var="key"/></list></block></script></block-definition><block-definition s="clear data in browser" type="command" category="other" helper="true"><header></header><code></code><translations>ca:esborra dades del navegador&#xD;</translations><inputs></inputs><script><block s="doWarp"><script><block s="doForEach"><l>item</l><custom-block s="stored data in browser"></custom-block><script><custom-block s="remove key: %s in browser"><block s="reportListItem"><l>1</l><block var="item"/></block></custom-block></script></block></script></block></script></block-definition><block-definition s="get value from key: %&apos;key&apos; in browser" type="reporter" category="other" helper="true"><comment x="0" y="0" w="199.33333333333334" collapsed="false">Reports the value previously stored under&#xD;the input key in the browser&apos;s local storage.&#xD;Reports False if the key is not found.</comment><header></header><code></code><translations>ca:obté valor de clau: _ al navegador&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>db_get(key)</l><list><block var="key"/></list></block></block></script></block-definition></blocks><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="1323"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhE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BgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGPgMDI3+AAEeFvcCAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="1324"></list></costumes><sounds><list struct="atomic" id="1325"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="how to use cloud database" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="1330"><costumes><list struct="atomic" id="1331"></list></costumes><sounds><list struct="atomic" id="1332"></list></sounds><blocks></blocks><variables></variables><scripts><script x="86" y="20"><custom-block s="setup cloud database named %txt with size %n"><l></l><l></l><comment w="174" collapsed="false">always use this first or the whole thing won&apos;t work&#xD;&#xD;size is the square route of how many variables you can fit in the database&#xD;&#xD;also this block contains a forever loop so any code after this will not run</comment></custom-block></script><script x="100" y="228"><custom-block s="set item x %n y %n of cloud database to %n"><l></l><l></l><l></l><comment w="90" collapsed="false">this only is used in the other custom blocks so its you dont need to use it</comment></custom-block></script><script x="154" y="304.00000000000006"><custom-block s="item x %n y %n of cloud database"><l></l><l></l><comment w="90" collapsed="false">this only is used in the other custom blocks so its you dont need to use it</comment></custom-block></script><script x="72" y="378.00000000000006"><custom-block s="scan for variable in cloud database named %txt"><l></l><comment w="90" collapsed="false">scans for a variables position in the database</comment></custom-block></script><script x="116" y="442"><custom-block s="set variable in cloud database %txt to %s"><l></l><l></l><comment w="90" collapsed="false">sets a certain variable in the cloud database</comment></custom-block></script><script x="135" y="167"><custom-block s="create variable %txt in cloud database"><l></l><comment w="90" collapsed="false">use this to create a variable in the cloud database</comment></custom-block></script><script x="165" y="505.83333333333326"><custom-block s="variable in cloud database %txt"><l></l><comment w="90" collapsed="false">reports a variable in the cloud database</comment></custom-block></script><script x="79" y="567.9999999999998"><custom-block s="change variable in cloud database %txt by %n"><l></l><l></l><comment w="90" collapsed="false">changes a certain variable in the cloud database</comment></custom-block></script></scripts></sprite><watcher var="cloud data" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="cloud variables" style="normal" x="10" y="103.000002" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="cloud data"><list struct="atomic" id="1361"></list></variable><variable name="variables in cloud database"><list struct="atomic" id="1362"></list></variable><variable name="database size"><l>0</l></variable><variable name="variable at x"><l>0</l></variable><variable name="variable at y"><l>0</l></variable><variable name="cloud variables"><l>0</l></variable></variables></scene></scenes></project><media name="cloud-database-utilities" app="Snap! 9.0, https://snap.berkeley.edu" version="2"></media></snapdata>