HTML output of Google Assistant SDK is truncated - google-assistant-sdk
I'm trying out the android things example app and have set the Screen Output to use HTML.
The output seems to be truncated and not terminated by the end html tag. Here is the actual output. Do you have any suggestions?
I'm using the grpc project/library from the android things example using the com.google.assistant.embedded.v1alpha2
# com.google.assistant.embedded.v1alpha2.AssistResponse#e3565447
screen_out {
data: "<html> <head><meta charset=\"UTF-8\"> <link href=\"https://fonts.googleapis.com/css?family=Roboto:400,700\" rel=\"stylesheet\"></head> <style>html,body{background:transparent;margin:0}#popout{bottom:0;box-sizing:border-box;font-family:\"Roboto\",sans-serif;font-size:40px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:antialiased;position:absolute;transform:translateZ(0);transition:opacity 500ms;transition-timing-function:ease-in-out;overflow:hidden;width:100%}#popout div{font-family:\'Roboto\',arial,sans-serif}.popout-shadow{background-image:linear-gradient(-180deg,rgba(0,0,0,0.0) 0%,rgba(0,0,0,0.8) 100%);height:5.4em;width:100%}.popout-overflow-shadow-down{background-image:linear-gradient(-180deg,rgba(0,0,0,0.0) 0%,rgba(0,0,0,0.8) 100%);bottom:144px;display:none;position:absolute;height:48px;width:100%;z-index:100}.popout-overflow-shadow-up{background-image:linear-gradient(-180deg,rgba(25,25,25,0.97) 50%,rgba(0,0,0,0.0) 100%);display:none;top:5.4em;height:48px;position:absolute;width:100%;z-index:100}.popout-content{background-color:rgba(25,25,25,.97);padding-right:28px;width:100%;overflow-y:scroll;overflow-x:hidden}.popout-content:hover,.popout-content:focus{outline:none}.popout-asbar:hover,.popout-asbar:focus{outline:none}.inactive{opacity:.4}#carousel-container{left:0;overflow-x:initial;transition:300ms ease-in-out;transform:translateZ(0)}</style> <script>\nwindow.Assistant = window.Assistant || {};var Assistant = window.Assistant;if (Assistant.clear)Assistant.clear();\nAssistant.clear = function(){if (Assistant.cleanup){Assistant.cleanup();}\nwindow.Assistant = {};};</script> <script>\nwindow.Assistant = window.Assistant || {};var Assistant = window.Assistant;\nAssistant.displayTimeoutMs = 20000;\nAssistant.micTimeoutMs = 0;\nAssistant.hideTimerId = undefined;\nAssistant.micTimerId = undefined;\nAssistant.isUsingRelativeIndex = false;\nAssistant.SUGGESTION_PROMPT_ID = \'suggestion_prompt\';\nAssistant.SUGGESTION_PROMPT;\nAssistant.SUGGESTION_CLASS_NAME = \'suggestion\';\nAssistant.POPOUT;\nAssistant.ICON;\nAssistant.cleanup = function(){Assistant.cleanupTimer_();};\nAssistant.updateDisplayTimeoutMs = function(displayTimeoutMs){if (displayTimeoutMs >= 0){Assistant.displayTimeoutMs = displayTimeoutMs;}\n};\nAssistant.updateMicTimeoutMs = function(micTimeoutMs){if (micTimeoutMs >= 0){Assistant.micTimeoutMs = micTimeoutMs;}\n};\nAssistant.updateIsUsingRelativeIndex = function(usingRelativeIndex){Assistant.isUsingRelativeIndex = !!usingRelativeIndex;};\nAssistant.cleanupTimer_ = function(){if (Assistant.hideTimerId){window.clearTimeout(Assistant.hideTimerId);Assistant.hideTimerId = undefined;}\nif (Assistant.micTimerId){window.clearTimeout(Assistant.micTimerId);Assistant.micTimerId = undefined;}\n};\nAssistant.getSuggestionPrompt = function(){if (!Assistant.SUGGESTION_PROMPT){Assistant.SUGGESTION_PROMPT =\ndocument.getElementById(Assistant.SUGGESTION_PROMPT_ID);}\nreturn Assistant.SUGGESTION_PROMPT;};\nAssistant.run = function(){Assistant.POPOUT = document.getElementById(\'popout\');Assistant.ICON = document.getElementsByClassName(\'assistant-icon\')[0];Assistant.keepShowing();};\nAssistant.keepShowing = function(){if (!Assistant.POPOUT){return;}\nAssistant.cleanupTimer_();Assistant.slideUpPopout();if (Assistant.displayTimeoutMs){Assistant.hideTimerId = setTimeout(function(){Assistant.hideTimerId = undefined;Assistant.slideDownPopout();if (typeof Assistant.maybePopulateNotification !== \'undefined\'){Assistant.maybePopulateNotification();}\n},Assistant.displayTimeoutMs);}\nif (Assistant.micTimeoutMs){Assistant.micStartListen();Assistant.micTimerId = setTimeout(function(){Assistant.micTimerId = undefined;Assistant.micStopListen();},Assistant.micTimeoutMs);}\n};\nAssistant.toggleElement = function(ele,display){var target = display ?\'\' :\'none\';if (ele.style.display != target){ele.style.display = target;}\n};\nAssistant.updateSuggest
2020-05-22 16:43:43.879 24567-24990/com.densoft.android I/EmbeddedAssistant: Assistant response:
Any suggestions?
The issue was Logcat in Android. I found that it is truncating the log message if size is over 4K.
Related
The first few messages are lost when transmitted to mqtt clients that were offline
I have vernemq server and mqtt clients using paho mqtt library (with python or C - no matter). Both subscribers and publishers use Qos2 and clean_session == False. So the problem is when subscriber is offline, I try to send some messages. Some of them are lost. After a detailed study of the parameters, I found out that the first max_inflight_messages are lost. What I mean. In the config file vernemq.conf I set max_inflight_messages = 20 (by default). Then subscriber go to offline, I send 21 messages, then subscriber go online, and first 20 are lost, 21s is delivered. I tried it many times with different amount of messages - the same result, first 20 messages are lost, from 21 and next are received. When I try max_inflight_messages = 1, first message is lost, others are received. Any ideas? My file vernemq.conf: allow_anonymous = on allow_register_during_netsplit = off allow_publish_during_netsplit = off allow_subscribe_during_netsplit = off allow_unsubscribe_during_netsplit = off allow_multiple_sessions = off coordinate_registrations = on max_inflight_messages = 20 max_online_messages = 1000 max_offline_messages = 1000 max_message_size = 0 upgrade_outgoing_qos = off listener.max_connections = 10000 listener.nr_of_acceptors = 10 listener.tcp.default = 0.0.0.0:1883 listener.vmq.clustering = 0.0.0.0:44053 listener.http.default = 0.0.0.0:8888 systree_enabled = on systree_interval = 20000 graphite_enabled = off graphite_host = localhost graphite_port = 2003 graphite_interval = 20000 shared_subscription_policy = prefer_local plugins.vmq_passwd = off plugins.vmq_acl = on plugins.vmq_diversity = off plugins.vmq_webhooks = off plugins.vmq_bridge = off metadata_plugin = vmq_plumtree vmq_acl.acl_file = ./etc/vmq.acl vmq_acl.acl_reload_interval = 10 vmq_passwd.password_file = ./etc/vmq.passwd vmq_passwd.password_reload_interval = 10 vmq_diversity.script_dir = ./share/lua vmq_diversity.auth_postgres.enabled = off vmq_diversity.postgres.ssl = off vmq_diversity.postgres.password_hash_method = crypt vmq_diversity.auth_cockroachdb.enabled = off vmq_diversity.cockroachdb.ssl = on vmq_diversity.cockroachdb.password_hash_method = bcrypt vmq_diversity.auth_mysql.enabled = off vmq_diversity.mysql.password_hash_method = password vmq_diversity.auth_mongodb.enabled = off vmq_diversity.mongodb.ssl = off vmq_diversity.auth_redis.enabled = off vmq_bcrypt.pool_size = 1 log.console = both log.console.level = debug log.console.file = ./log/console.log log.error.file = ./log/error.log log.syslog = off log.crash = on log.crash.file = ./log/crash.log log.crash.maximum_message_size = 64KB log.crash.size = 10MB log.crash.rotation = $D0 log.crash.rotation.keep = 5 nodename = VerneMQ#127.0.0.1 distributed_cookie = vmq erlang.async_threads = 64 erlang.max_ports = 262144 leveldb.maximum_memory.percent = 70
The problem was in paho mqtt library. When client connect to broker, he receive all messages, but handlers for this messages assigned only when it subscrybe to concrete topic.
ELKI CSV parser problems
I have changed an .arff file to a .csv file in a tool in Weka. But now I can't use the arffparser as parser in ELKI. What parser should I then use? The default is NumberVectorLabelParser. But it gives me a ArrayIndexOutOfBoundsException: Running: -verbose -verbose -dbc.in /home/db/lisbet/Datasets/without ids/try 2/calling them .txt using another parser/Lymphography_withoutdupl_norm_1ofn.csv -dbc.parser NumberVectorLabelParser -algorithm outlier.lof.LOF -lof.k 2 -evaluator outlier.OutlierROCCurve -rocauc.positive yes Task failed java.lang.ArrayIndexOutOfBoundsException: 47 at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.getTypeInformation(NumberVectorLabelParser.java:337) at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.buildMeta(NumberVectorLabelParser.java:242) at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.nextEvent(NumberVectorLabelParser.java:211) at de.lmu.ifi.dbs.elki.datasource.bundle.MultipleObjectsBundle.fromStream(MultipleObjectsBundle.java:242) at de.lmu.ifi.dbs.elki.datasource.parser.AbstractStreamingParser.asMultipleObjectsBundle(AbstractStreamingParser.java:89) at de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection.loadData(InputStreamDatabaseConnection.java:91) at de.lmu.ifi.dbs.elki.database.StaticArrayDatabase.initialize(StaticArrayDatabase.java:119) at de.lmu.ifi.dbs.elki.workflow.InputStep.getDatabase(InputStep.java:62) at de.lmu.ifi.dbs.elki.KDDTask.run(KDDTask.java:108) at de.lmu.ifi.dbs.elki.application.KDDCLIApplication.run(KDDCLIApplication.java:60) at [...] My .csv file looks like this: 'Lymphatics = deformed','Lymphatics = displaced','Lymphatics = arched','Lymphatics = normal','Block_of_affere = yes','Block_of_affere = no','Bl_of_lymph_c = no','Bl_of_lymph_c = yes','Bl_of_lymph_s = no','Bl_of_lymph_s = yes','By_pass = no','By_pass = yes','Extravasates = yes','Extravasates = no','Regeneration_of = no','Regeneration_of = yes','Early_uptake_in = yes','Early_uptake_in = no','Changes_in_lym = oval','Changes_in_lym = round','Changes_in_lym = bean','Defect_in_node = lacunar','Defect_in_node = lac_central','Defect_in_node = lac_margin','Defect_in_node = no','Changes_in_node = lac_central','Changes_in_node = lacunar','Changes_in_node = no','Changes_in_node = lac_margin','Changes_in_stru = faint','Changes_in_stru = drop_like','Changes_in_stru = stripped','Changes_in_stru = coarse','Changes_in_stru = diluted','Changes_in_stru = grainy','Changes_in_stru = no','Changes_in_stru = reticular','Special_forms = vesicles','Special_forms = no','Special_forms = chalices','Dislocation_of = no','Dislocation_of = yes','Exclusion_of_no = yes','Exclusion_of_no = no',Lym_nodes_dimin,Lym_nodes_enlar,No_of_nodes_in,Outlier 1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0.333333,0.285714,no 0,1,0,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0.333333,0.142857,no There are 11 parsers available. But maybe it is my data, that is to large for the parser.
Thank you, this is a bug in the ELKI CSV parser. It did not expect the class column to have a label. So if your remove the ,Outlier part of your first line (or the first line completely), it should read this file just fine. I will push a change that makes it more robust here (it will still lose the label though, because ELKI currently has support column labels for numerical columns but not for string label columns).
Coffeescript loop simplifying
Sended data is Ruby format: mob = {id: 1, xpos:100, ypos:150, xposDest:150, yposDest:100, attacked:0} WebsocketRails[:channel_name].trigger(:event_name, mob) How could i make this loop simpler? (it's coffeescript) get_all_mobs: (mob) -> // getting "mob" with Websockets mob_list[mob.id].id = mob.id mob_list[mob.id].xpos = mob.xpos if mob.xpos? mob_list[mob.id].ypos = mob.ypos if mob.ypos? mob_list[mob.id].xposDest = mob.xposDest if mob.xposDest? mob_list[mob.id].yposDest = mob.yposDest if mob.yposDest? mob_list[mob.id].health = mob.health if mob.health? mob_list[mob.id].level = mob.level if mob.level? mob_list[mob.id].max_health = mob.max_health if mob.max_health? mob_list[mob.id].attacked = mob.attacked if mob.attacked? mob_list[mob.id].steps = mob.steps if mob.steps? Was tryed something like this, but its wrong: get_all_mobs: (mob) -> // getting "mob" with Websockets for attribute in mob mob_list[mob.id].attribute = mob.attribute
This should do: get_all_mobs: (mob) -> // getting "mob" with Websockets for own key, value of mob mob_list[mob.id][key] = value if value?
How do I use -analyzeduration from ffmpeg with FFmpegDecoder.framework from mooncatventures?
I have been playing with the RtspPlay1 from mooncatventures to try and stream a live stream from an ffmpeg streaming source with as little delay as possible. The problem is even when I modify the code to indicate the -analyzedelay 0 flags in RtspPlay1 it does not seem to do anything. I came to this conclusion because the delay is the same on my computer without the -analyzeduration 0 flag as the iOS device. Any thoughts would be helpful. Here is the command I am trying to emulate on the iPhone: ffplay rtp:///224.1.1.1:11326 -analyzeduration 0 Here is the modified code I tried with RtspPlay1: forward_argc=1; forward_argv[1] = "-analyzeduration"; forward_argv[2] = "0"; //forward_argv[3] = "30"; //forward_argv[4] = "-fast"; //forward_argv[5] = "-sync"; //forward_argv[6] = "video"; //forward_argv[7] = "-drp"; //forward_argv[8] = "-skipidct"; //forward_argv[9] = "10"; //forward_argv[10] = "-skiploop"; //forward_argv[11] = "50"; //forward_argv[12] = "-threads"; //forward_argv[13] = "5"; //argv[14] = "-an"; forward_argv[3] = cString; NSLog(#"glflag %#\n ",[parms objectForKey:#"glflag"] ); if ([parms objectForKey:#"glflag"]!=#"1") { forward_argv[4]="0"; }else { forward_argv[4]="1"; } forward_argc += 4;
OpenOffice Draw macro to find replace text
I'm looking to find replace text within multiple PDF documents using Draw. Thus far I've managed to open the PDF however mydoc.createReplaceDescription appears not to be a valid property / method on a Draw doc. Although oddly this is used in many examples for writer and calc. Are there any alternatives?
Okay after some playing around with the recorder in the Writer I managed to record a macro that seems to be more general purpose than the createReplaceDiscription I was trying earlier. It's got a lot of bumf that I guess could be cleaned up but it works... REM ***** BASIC ***** Sub Main End Sub sub WriterFindReplace rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(18) as new com.sun.star.beans.PropertyValue args1(0).Name = "SearchItem.StyleFamily" args1(0).Value = 2 args1(1).Name = "SearchItem.CellType" args1(1).Value = 0 args1(2).Name = "SearchItem.RowDirection" args1(2).Value = true args1(3).Name = "SearchItem.AllTables" args1(3).Value = false args1(4).Name = "SearchItem.Backward" args1(4).Value = false args1(5).Name = "SearchItem.Pattern" args1(5).Value = false args1(6).Name = "SearchItem.Content" args1(6).Value = false args1(7).Name = "SearchItem.AsianOptions" args1(7).Value = false args1(8).Name = "SearchItem.AlgorithmType" args1(8).Value = 0 args1(9).Name = "SearchItem.SearchFlags" args1(9).Value = 65536 args1(10).Name = "SearchItem.SearchString" args1(10).Value = "<<THE WORD YOUR FINDING>>" args1(11).Name = "SearchItem.ReplaceString" args1(11).Value = "<< THE WORD YOUR USING TO REPLACE>>" args1(12).Name = "SearchItem.Locale" args1(12).Value = 255 args1(13).Name = "SearchItem.ChangedChars" args1(13).Value = 2 args1(14).Name = "SearchItem.DeletedChars" args1(14).Value = 2 args1(15).Name = "SearchItem.InsertedChars" args1(15).Value = 2 args1(16).Name = "SearchItem.TransliterateFlags" args1(16).Value = 1280 args1(17).Name = "SearchItem.Command" args1(17).Value = 3 args1(18).Name = "Quiet" args1(18).Value = true dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1()) end sub