I am getting this syntax error " missing ';' " in hyperledger composer. Does anyone know how to fix this? - hyperledger

I have just started working on the Hyperledger composer. I am trying to create a car auction business network but I am getting this error : "SyntaxError: missing ; before statement".
How do I solve that?
Also how do I access the underlying code for the fabric?

Related

Query InfluxDB with a Flux string throws Syntax Error

I inserted the below into my influxdb bucket named test.
t0921 name="A",population=93215,date_mod="2004-5-29"
t0922 name="B",population=23719,date_mod="2004-7-6"
t0923 name="C",population=43817,date_mod="2004-8-12"
Ran the following command... just as the documentation says
influx query 'from(bucket:"test")|> range(start:-24h)'
...Got the error
Syntax Error
Have been trying for hours but still cannot figure out. Could anyone help me what I am doing wrong?
I am new to this Flux language and been reading documentation but maybe I am missing something.

Error Deploying Scriptable-Transform in Spring Cloud Data Flow : ParserException

I'm trying to construct a stream in spring cloud data flow with kafka-based scriptable transform. I followed the instruction here:
https://docs.spring.io/spring-cloud-stream-app-starters/docs/Celsius.SR2/reference/htmlsingle/#spring-cloud-stream-modules-scriptable-transform
and my stream definition looks like this:
:SCDF_SORUCE > scriptable-transformer --language=ruby --script="return ""#{payload} extended"";" > :SCDF_DESTINATION
The "scriptable-transformer" app is registered with the following uri:
maven://org.springframework.cloud.stream.app:scriptable‑transform‑processor‑kafka:2.0.0.RELEASE
When I tried to deploy the stream, I see the following error in my skipper log:
org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 13, column 5:
"spring.metrics.export.triggers. ...
^
expected <block end>, but found Scalar
in 'reader', line 18, column 40:
... riptable-transformer.script": ""return ""#{payload} extended"";""
^
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:569) ~[snakeyaml-1.17.jar!/:na]
I've also tried to use js and python script, but got similar results.
How could I fix this error?
Here is a short summary of the scdf version being used:
- scdf local server: 1.5.2.RELEASE
- skipper server: 1.0.7.RELEASE
I believe you are referring to the scriptable-transform (not scriptable-transformER) app?
Anyway i've tried it and can confirm the issue when using the same transform expression in Skipper mode (expression works as it is in classic mode).
However if you replace the double with single quotes i believe it will resolve the issue. Following pipeline works fine for me with Kafka, Skipper:
time | scriptable-transform --scriptable-transformer.language=ruby --scriptable-transformer.script="return '#{payload} extended';" | log
I will investigate further to figure out if this is a documentation or code issue. In the meantime could you pleas try to above mention workaround and let me know if it solves to problem?
Thanks

ROBLOX Lua Error in script: '=' expected near '<eof>'

Hello I am writing a scipt on ROBLOX and I have encountered a problem.
function showVictoryMessage(playerName)
local message = Instance.new("Message")
message.Text = playerName .." has won!"
message.Parent = game.Workspace
wait (2)
message.Destroy()
end
Upon running this function, or more specifically the "message.Destroy" command, I get the error: Error in script: '=' expected near '< eof >'
I have never seen this error before, and the ROBLOX wiki page on Lua errors doesn't mention it.
I would very much appreciate help in this, because I don't personally know anyone who has coded in Lua.
Looks like a syntax error. message.Destroy() should be message:Destroy() according to this Roblox wiki page http://wiki.roblox.com/index.php?title=API:Class/Instance/Destroy
Also see the section Explosions, Messages, and More at URL http://wiki.roblox.com/index.php?title=Basic_Scripting which provides similar syntax using the colon (:) operator.
See also Difference between . and : in Lua and explanation of "possible side-effects of calculations/access are calculated only once" with colon notation.
Instead of message.Destroy() it should be message:Destroy()
Remember that '.' are used directory-wise and ":' are used for inbuilt functions.
WOOOOOOOO! It was a syntax error. The correct command is message:Destroy. Cause why would object.Destroy work and message.Destroy not?

Exception Error, Erlang

This question is with reference to the question in the link:
"** exception error: undefined function add:addfunc/0 in Erlang "
I'm trying to execute a simple erlang program of adding two numbers. I'm trying to do this in Eclipse on Ubuntu 10.04 LTS.
When I execute this program, I'm getting the error as shown below:
-module(add).
-export([addfunc/0]).
addfunc() ->
6 + 5.
" ** exception error: undefined function add:addfunc/0 "
This program when executed in the erlang shell is working fine. But when it comes to eclipse it's giving me this error. Not this, any program for that matter is giving me the similar error. Guess I would be missing something about the eclipse configuration.
I haven't tested your code, but this very basic code should work.
The message says that your function does not exist.
Make sure that you have no errors at compile time.
Check whether your function is exported with:
add:module_info().
the result should look alike this:
[{module,add},
{exports,[{addfunc,0},
.....

How can I use hierarchicalClustering?

I use this code:
int c_count =cv::flann::hierarchicalClustering<L2<float> >(data,cluster,kmeans_param);
I got this error:
error C2146: syntax error : missing ';' before identifier 'ElementType'
How can I solve it?
My features is 3d (x,y,theta) that I want to cluster these.
when the classification was done.How can I access to cluster id for each feature?

Resources