Twine: How to create click link for number variable - twine-game-engine

The Problem lies at where i do the score editions, $numOrder is equivalent to a orderedArray of c1 c2 c3 but i can't seem to use them as hook for click. The error message says it expects a ?this or string. Can click hook be a number?
(print: "$temp <br/>")
<b>(print: "$c1 $c2 $c3")</b>
(set: $numOrder to (sorted:...(a:$c1,$c2,$c3)))
(if: $temp is $Bigger)
[
(click:$numOrder's 1st)[(set:$score to $score-0.5)]
(click:$numOrder's 2nd)[(set:$score to $score-0.5)]
(click:$numOrder's 3rd)[(set:$score to $score+1)]
]
(elseif:$temp is $Smaller)
[
(click:$numOrder's 1st)[(set:$score to $score+1)]
(click:$numOrder's 2nd)[(set:$score to $score-0.5)]
(click:$numOrder's 3rd)[(set:$score to $score-0.5)]
]
(else:)
[
(click:$numOrder's 1st)[(set:$score to $score-0.5)]
(click:$numOrder's 2nd)[(set:$score to $score+1)]
(click:$numOrder's 3rd)[(set:$score to $score-0.5)]
]
]
(else:)
[
(print:"<br\><br\>Well that was easy!")
(stop:)
]
]}

Related

CMake can't find Boost::thread on Windows 10

I'm trying to build windows package of my Qt project.
The following is part of my CMakeList.txt file.
set (Boost_USE_STATIC_LIBS ON)
set (Boost_DEBUG ON)
set (BOOST_ROOT "C:\\Dev\\boost\\boost_1_78_0")
FIND_PACKAGE(Boost 1.70 REQUIRED)
FIND_PACKAGE(Boost REQUIRED COMPONENTS thread)
target_link_libraries(myAppName Boost::thread)
The output after I enter cmake .. in the myAppName\build is
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1657 ] _boost_TEST_VERSIONS = "1.75.0;1.75;1.74.0;1.74;1.73.0;1.73;1.72.0;1.72;1.71.0;1.71;1.70.0;1.70"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1658 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1659 ] Boost_USE_STATIC_LIBS = "ON"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1660 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1661 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1662 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1694 ] BOOST_ROOT = "C:\Dev\boost\boost_1_78_0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1695 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1696 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1697 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1698 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1699 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1771 ] _boost_INCLUDE_SEARCH_DIRS = "C:\Dev\boost\boost_1_78_0/include;C:\Dev\boost\boost_1_78_0;PATHS;C:/boost/include;C:/boost;/sw/local/include"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1772 ] _boost_PATH_SUFFIXES = "boost-1_75_0;boost_1_75_0;boost/boost-1_75_0;boost/boost_1_75_0;boost-1_75;boost_1_75;boost/boost-1_75;boost/boost_1_75;boost-1_74_0;boost_1_74_0;boost/boost-1_74_0;boost/boost_1_74_0;boost-1_74;boost_1_74;boost/boost-1_74;boost/boost_1_74;boost-1_73_0;boost_1_73_0;boost/boost-1_73_0;boost/boost_1_73_0;boost-1_73;boost_1_73;boost/boost-1_73;boost/boost_1_73;boost-1_72_0;boost_1_72_0;boost/boost-1_72_0;boost/boost_1_72_0;boost-1_72;boost_1_72;boost/boost-1_72;boost/boost_1_72;boost-1_71_0;boost_1_71_0;boost/boost-1_71_0;boost/boost_1_71_0;boost-1_71;boost_1_71;boost/boost-1_71;boost/boost_1_71;boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1787 ] location of version.hpp: C:/Dev/boost/boost_1_78_0/boost/version.hpp
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1827 ] Boost_VERSION = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1828 ] Boost_VERSION_STRING = "1.78.0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1829 ] Boost_VERSION_MACRO = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1830 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1831 ] Boost_VERSION_MINOR = "78"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1832 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1833 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1857 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1858 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-gcc11" (guessed)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1894 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1972 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1976 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1977 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2037 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2038 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- Found Boost: C:/Dev/boost/boost_1_78_0 (found suitable version "1.78.0", minimum required is "1.70")
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1657 ] _boost_TEST_VERSIONS = "1.75.0;1.75;1.74.0;1.74;1.73.0;1.73;1.72.0;1.72;1.71.0;1.71;1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1658 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1659 ] Boost_USE_STATIC_LIBS = "ON"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1660 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1661 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1662 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1694 ] BOOST_ROOT = "C:\Dev\boost\boost_1_78_0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1695 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1696 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1697 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1698 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1699 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1787 ] location of version.hpp: C:/Dev/boost/boost_1_78_0/boost/version.hpp
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1827 ] Boost_VERSION = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1828 ] Boost_VERSION_STRING = "1.78.0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1829 ] Boost_VERSION_MACRO = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1830 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1831 ] Boost_VERSION_MINOR = "78"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1832 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1833 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1857 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1858 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-gcc11" (guessed)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1894 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1972 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1976 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1977 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2037 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2038 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-gcc11-mt-1_78;boost_thread-gcc11-mt;boost_thread-gcc11-mt;boost_thread-mt-1_78;boost_thread-mt;boost_thread-mt;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-gcc11-mt-d-1_78;boost_thread-gcc11-mt-d;boost_thread-gcc11-mt-d;boost_thread-mt-d-1_78;boost_thread-mt-d;boost_thread-mt-d;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for CHRONO_LIBRARY_RELEASE: boost_chrono-gcc11-mt-1_78;boost_chrono-gcc11-mt;boost_chrono-gcc11-mt;boost_chrono-mt-1_78;boost_chrono-mt;boost_chrono-mt;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for CHRONO_LIBRARY_DEBUG: boost_chrono-gcc11-mt-d-1_78;boost_chrono-gcc11-mt-d;boost_chrono-gcc11-mt-d;boost_chrono-mt-d-1_78;boost_chrono-mt-d;boost_chrono-mt-d;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc11-mt-1_78;boost_date_time-gcc11-mt;boost_date_time-gcc11-mt;boost_date_time-mt-1_78;boost_date_time-mt;boost_date_time-mt;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc11-mt-d-1_78;boost_date_time-gcc11-mt-d;boost_date_time-gcc11-mt-d;boost_date_time-mt-d-1_78;boost_date_time-mt-d;boost_date_time-mt-d;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for ATOMIC_LIBRARY_RELEASE: boost_atomic-gcc11-mt-1_78;boost_atomic-gcc11-mt;boost_atomic-gcc11-mt;boost_atomic-mt-1_78;boost_atomic-mt;boost_atomic-mt;boost_atomic-mt;boost_atomic
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for ATOMIC_LIBRARY_DEBUG: boost_atomic-gcc11-mt-d-1_78;boost_atomic-gcc11-mt-d;boost_atomic-gcc11-mt-d;boost_atomic-mt-d-1_78;boost_atomic-mt-d;boost_atomic-mt-d;boost_atomic-mt;boost_atomic
CMake Error at /usr/share/cmake-3.20.0/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: thread) (found version "1.78.0")
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
CMakeLists.txt:51 (FIND_PACKAGE)
I've tried precompiled version and gcc11 locally compiled version, same output.
I'm using gcc-11 now.
Also tried 1.74.0, similar results except the New Boost version may have incorrect or missing dependencies and imported targets warnings.
It seems that cmake didn't find thread which is the important package my project used.
It costs me a lot of time to deal with this.
Hoping that someone helps me solving this problem.

Grok pattern for data separated by pipe with whitespaces and optional values in it

I have a textfile/logfile in which the values are separated by a pipe symbol. "|" with multiple whitespaces.
Also I just wanted to try it without gsub.
An example is below,
Does anyone know how to write a GROK pattern to extract it for logstash? as I am very new to it. Thanks in advance
5000| | |applicationLog |ClientLog |SystemLog |Green | |2014-01-07 11:58:48.76948 |12345 (0x1224)|1) Error 2)Sample Log | Configuration Manager
Since the number of | are inconsistent between different words, you can match it with .*? and extract rest of the data as predefined grok pattern
%{NUMBER:num}.*?%{WORD:2nd}.*?%{WORD:3rd}.*?%{WORD:4th}.*?%{WORD:5th}.*?%{TIMESTAMP_ISO8601}
which will give you,
{
"num": [
[
"5000"
]
],
"BASE10NUM": [
[
"5000"
]
],
"2nd": [
[
"applicationLog"
]
],
"3rd": [
[
"ClientLog"
]
],
"4th": [
[
"SystemLog"
]
],
"5th": [
[
"Green"
]
],
"TIMESTAMP_ISO8601": [
[
"2014-01-07 11:58:48.76948"
]
],
"YEAR": [
[
"2014"
]
],
"MONTHNUM": [
[
"01"
]
],
"MONTHDAY": [
[
"07"
]
],
"HOUR": [
[
"11",
null
]
],
"MINUTE": [
[
"58",
null
]
],
"SECOND": [
[
"48.76948"
]
],
"ISO8601_TIMEZONE": [
[
null
]
]
}
You can test it at online grok debugger.
Since you are new to grok you might want to read, grok filter plugin basics
If you can, I'd suggest you to also have a look in dissect filter which is faster and efficient than grok,
The Dissect filter is a kind of split operation. Unlike a regular
split operation where one delimiter is applied to the whole string,
this operation applies a set of delimiters to a string value. Dissect
does not use regular expressions and is very fast. However, if the
structure of your text varies from line to line then Grok is more
suitable. There is a hybrid case where Dissect can be used to
de-structure the section of the line that is reliably repeated and
then Grok can be used on the remaining field values with more regex
predictability and less overall work to do.

tegrahost_v2: Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed

I've built an image for Jetson TX2 module using yocto. Everything when fine for few days but now I get this error when I try to flash the device.
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
[ 0.0008 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0016 ] Assuming zero filled SBK key
[ 0.0016 ]
[ 0.0016 ] Generating RCM messages
[ 0.0023 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0030 ] RCM 0 is saved as rcm_0.rcm
[ 0.0033 ] RCM 1 is saved as rcm_1.rcm
[ 0.0033 ] List of rcm files are saved in rcm_list.xml
[ 0.0033 ]
[ 0.0033 ] Signing RCM messages
[ 0.0040 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0046 ] Assuming zero filled SBK key
[ 0.0076 ]
[ 0.0076 ] Copying signature to RCM mesages
[ 0.0083 ] tegrarcm_v2 --chip 0x18 --updatesig rcm_list_signed.xml
[ 0.0093 ]
[ 0.0093 ] Parsing partition layout
[ 0.0100 ] tegraparser_v2 --pt flash.xml.tmp
[ 0.0109 ]
[ 0.0109 ] Creating list of images to be signed
[ 0.0116 ] tegrahost_v2 --chip 0x18 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 0.0124 ] Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed
[ 0.0161 ]
Error: Return value 4
Command tegrahost_v2 --chip 0x18 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
Does this error ring a bell to anyone?
I am able to flash the board with JetPack.
Thanks,
-Damien
Just in case you never figured this out, it looks like
[ 0.0124 ] Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed
is the real error. Fix that and you should be good.

Handling 4-block oriented matrix product and inversion in Maxima

I am concerned in finding symbolic solutions and expansion to matrix products and inversions. Actually, it is something I would like to define by myself. I will explain myself.
I want to create a "mathematical" object that i will call B4MAT which represents a square matrix whose elements are 4 square half-sized matrices. So I want to define the product between two B4MAT giving me back another B4MAT whose components are calculated by applying product rules, but among matrices, not scalars.
Furthermore, and this is a very important point, consider Blockwise Inversion of a matrix. I want to define inversion of a B4MAT as an operation returning me another B4MAT whose elements are calculated using the blockwise inversion algorithm in the link.
How to achieve this in Maxima?
Thankyou
For the first half of your question, you just need to change matrix_element_mult to non-commutative multiplication and then use a matrix whose elements are the blocks you want. For example:
Maxima branch_5_27_base_248_ge261c5e http://maxima.sourceforge.net
using Lisp SBCL 1.0.57.0.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) A: matrix([1,2],[3,4])$ B: matrix([2,1],[3,4])$
(%i3) matrix([A,B], [B,A]);
*** output flushed ***
(%i4) C: matrix([A,B], [B,A]);
[ [ 1 2 ] [ 2 1 ] ]
[ [ ] [ ] ]
[ [ 3 4 ] [ 3 4 ] ]
(%o4) [ ]
[ [ 2 1 ] [ 1 2 ] ]
[ [ ] [ ] ]
[ [ 3 4 ] [ 3 4 ] ]
(%i5) C . C;
[ [ 5 5 ] [ 4 4 ] ]
[ [ ] [ ] ]
[ [ 18 32 ] [ 18 32 ] ]
(%o5) [ ]
[ [ 4 4 ] [ 5 5 ] ]
[ [ ] [ ] ]
[ [ 18 32 ] [ 18 32 ] ]
(%i6) matrix_element_mult: ".";
(%o6) .
(%i7) C . C;
[ [ 14 16 ] [ 13 17 ] ]
[ [ ] [ ] ]
[ [ 33 41 ] [ 33 41 ] ]
(%o7) [ ]
[ [ 13 17 ] [ 14 16 ] ]
[ [ ] [ ] ]
[ [ 33 41 ] [ 33 41 ] ]
I think you have to code up the inversion formula yourself though (don't forget you can get at the blocks with expressions like "C[1][2]" (for the top right corner) etc.

Generating a quiz in Emacs Lisp?

Forgive the "duplicate" question. I'd like to see this solved in Emacs Lisp too, and if I just tagged it for both topics, I probably would have only gotten one answer. The Emacs answer should be sufficiently different that it's probably worthwhile to have it.
I want to teach myself Spanish and I've got several word lists like
the data show below. How can I generate a quiz from the data that
looks like this?
amarillo? [ ] blue [ ] yellow [ ] gray [ ] pink
azul? [ ] red [ ] blue [ ] green [ ] orange
.
.
.
verde? [ ] purple [ ] gold [ ] green [ ] black
The idea is to randomly include the answer with 3 randomly chosen
incorrect answers. Ideally, the incorrect answers would not be too
repetitive.
amarillo|yellow
azul|blue
blanco|white
dorado|golden
gris|gray
marrón|brown
naranja|orange
negro|black
oro|gold
púrpura|purple
rojo|red
rosa|pink
verde|green
Ok, so I'm assuming that you have the input in a file opened in an Emacs buffer.
(defun insert-quiz (a-buffer)
(interactive "bBuffer name: ")
(let* ((question-pairs (split-string (with-current-buffer a-buffer (buffer-string))))
(quiz-answers (mapcar (lambda (x) (cadr (split-string x "|"))) question-pairs)))
(insert
(apply #'concat
(mapcar
(lambda (x)
(let ((q-pair (split-string x "|")))
(make-question (car q-pair) (answers-list quiz-answers (cadr q-pair)))))
question-pairs)))))
insert-quiz is an interactive function that takes a buffer name, and uses the stuff in that buffer to generate a quiz for you, then insert that quiz at point as a side-effect. It calls some smaller functions which I'll explain below.
(defun make-question (question answers)
(apply #'format
"%-16s[ ] %-16s[ ] %-16s[ ] %-16s[ ] %s \n"
(append
(list (concat question "?"))
answers)))
make-question takes a question and a list of answers, and formats them as one line of the quiz.
(defun answers-list (quiz-answers right-answer)
(replace (n-wrong-answers quiz-answers right-answer)
(list right-answer)
:start1 (random 3)))
answers-list takes a list of all possible answers in the quiz, and the right answer and uses n-wrong-answers to create a list of four answers, one of which is the correct one.
(defun n-wrong-answers (answer-list right-answer &optional answers)
(if (= 4 (list-length answers))
answers
(n-wrong-answers
answer-list
right-answer
(add-to-list 'answers (random-wrong-answer answer-list right-answer)))))
n-wrong-answers takes a list of all possible answers in the quiz, and the right answer, then uses random-wrong-answer to return a list of four unique incorrect answers.
(defun random-wrong-answer (answer-list right-answer)
(let ((gen-answer (nth (random (list-length answer-list)) answer-list)))
(if (and gen-answer (not (string= gen-answer right-answer)))
gen-answer
(random-wrong-answer answer-list right-answer))))
Finally, at the lowest level, random-wrong-answer takes a list of all possible answers in the quiz, and returns a single wrong answer.
After you load the above functions into Emacs, use M-x insert-quiz and type the name of the buffer you have your input loaded into (you'll get tab completion). It wouldn't be too difficult to change the insert-quiz function so that it takes a filename rather than an open buffer-name.
The input you list above will yield:
amarillo? [ ] yellow [ ] orange [ ] gray [ ] red
azul? [ ] gold [ ] purple [ ] blue [ ] orange
blanco? [ ] pink [ ] red [ ] white [ ] black
dorado? [ ] yellow [ ] golden [ ] red [ ] orange
gris? [ ] red [ ] pink [ ] gray [ ] green
marrón? [ ] brown [ ] yellow [ ] white [ ] golden
naranja? [ ] orange [ ] gold [ ] black [ ] golden
negro? [ ] pink [ ] black [ ] blue [ ] white
oro? [ ] red [ ] gold [ ] purple [ ] brown
púrpura? [ ] purple [ ] orange [ ] gray [ ] black
rojo? [ ] gray [ ] red [ ] black [ ] pink
rosa? [ ] red [ ] green [ ] pink [ ] yellow
verde? [ ] green [ ] purple [ ] red [ ] brown
Hope that helps.

Resources