Print When Expression Jasper reports - jasper-reports

Is the following Print When Expression invaild:
29 <= $F{selfawarenesscore} <= 45
I get the following error in JasperReports Server
com.jaspersoft.jasperserver.api.JSExceptionWrapper:
Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_subreport2_EmotionalSelfAwareness40QI41_1370531739954_546871: 233:
unexpected token: <= # line 233, column 83. 1 error
I want to print a text field when $F{selfawarenesscore} is the above mentioned range.
Any help is appreciated.

Try:
$F{selfawarenessscore} >= 29 && $F{selfawarenessscore} <= 45

Related

PF_RING 7.9.0 issue with deb package creation

I am trying to create deb packages for my work and have run into the following trouble.
The version of dkms being used as shown in the screen shot is 2.2.1.0. I have tried it out even with dkms 2.8.3 but I get the same error.
I am unsure what to do next or try next as I cannot understand.A little guidance is requested.
the exact issue that is being shown is the following. There is a Perl module named Dh_Lib.pm with a subroutine should_use_root() as shown below the error and the issue has been marked there.
Building binary package...dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-source --before-build .
fakeroot debian/rules clean
Initialization of state variables in list context currently forbidden at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 2021, near ");"
BEGIN not safe after errors--compilation aborted at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 2743.
Compilation failed in require at /usr/bin/dh_testdir line 11.
BEGIN failed--compilation aborted at /usr/bin/dh_testdir line 11.
make[1]: *** [debian/rules:25: clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
(bad exit status: 2)
Error! There was a problem creating your deb.
make: *** [Makefile.dkms:28: deb] Error 7
root#VEHERE:/home/vehere/Release/probe/deps/PF_RING-7.9.0/kernel#
# Return true if we should use root.
# - Takes an optional keyword; if passed, this will return true if the keyword is listed in R^3 (Rules-Requires-Root)
# - If the optional keyword is omitted or not present in R^3 and R^3 is not 'binary-targets', then returns false
# - Returns true otherwise (i.e. keyword is in R^3 or R^3 is 'binary-targets')
sub should_use_root {
my ($keyword) = #_;
my $rrr_env = $ENV{'DEB_RULES_REQUIRES_ROOT'} // 'binary-targets';
$rrr_env =~ s/^\s++//;
$rrr_env =~ s/\s++$//;
return 0 if $rrr_env eq 'no';
return 1 if $rrr_env eq 'binary-targets';
return 0 if not defined($keyword);
state %rrr = map { $_ => 1 } split(' ', $rrr_env); << ---- issues
return 1 if exists($rrr{$keyword});
return 0;
}
The version of perl being used is 5.24.1

Reading a ply file in matlab (output from Noah Snavely's tool Bundler)

I'm trying to open .ply files and display them in matlab using the following code :
http://people.sc.fsu.edu/~jburkardt/m_src/ply_display/ply_display.m
But it is showing an error
XY_DISPLAY:
Enter the name of the point file (in 'quotes'!).
'C:\SFM\examples\ET\bundle\points001.ply';
27 verbose = 0;
Error using ply_display>ply_to_tri_surface (line 140)
No such file or directory
Error in ply_display (line 48)
[ node_xyz, element_node ] = ply_to_tri_surface ( ply_filename );
Error in ply_display>ply_to_tri_surface (line 732)
ply_display ( 'C:\SFM\examples\new one\bundle\points001.ply' );
Error in ply_display (line 48)
[ node_xyz, element_node ] = ply_to_tri_surface ( ply_filename );
Can anyone please help me regarding this ?
Thanks!
As should be pretty clear from the error output, your error is not in line 27 (actually I don't know why that shows up). What the error trace shows you is this:
1) The error starts when ply_display calls another function, ply_to_tri_surface (which is defined in the same file).
[ node_xyz, element_node ] = ply_to_tri_surface ( ply_filename );
2) Within that second function, the actual error is being triggered at line 140:
Error using ply_display>ply_to_tri_surface (line 140)
No such file or directory
(The reference to line 732 is a bit of a red herring - that is because this is where the error is being returned from ply_to_tri_surface to ply_display I think).
Looking at the actual code, this is the part causing the error (around line 140) - where the program first tries to open your file:
[ fid, Msg ] = fopen ( ply_filename, 'rt' );
if ( fid == -1 )
error ( Msg );
end
That is, ply_filename - your ply file - cannot be found. Either the filename is wrong or the way you are inputting it (are you typing that semicolon at the end of the filename?) is causing issues.
Two options:
1) Run dbstop if error, then re-run the code. When it errors, you should be able to see what ply_filename contains. (Run dbquit to exit debug mode).
2) Input your filename directly when running by calling the function from the command line, e.g. ply_display('test.ply') or ply_display(filename) where filename is a previously defined variable.

having errors when compile .cc file to mex in Matlab

I am trying to complie a .cc file to mex, and I am using mex filename command in Matlab. My complier is [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012b\sys\lcc .
However, there are some errors:
lcc preprocessor error: learn.cc:5 Could not find include file <sys/time.h>
Error learn.cc: 70 illegal statement termination
Error learn.cc: 70 skipping `int'
Error learn.cc: 70 undeclared identifier `alen'
Error learn.cc: 71 illegal statement termination
Error learn.cc: 71 skipping `int'
Error learn.cc: 71 undeclared identifier `blen'
Error learn.cc: 87 invalid struct field declarations
Error learn.cc: 87 syntax error; found `collapsed' expecting `}'
Error learn.cc: 87 skipping `collapsed' `*' `x'
Error learn.cc: 93 unrecognized declaration
Warning learn.cc: 93 empty declaration
Error learn.cc: 97 undefined size for `incomplete struct timeval defined at learn.cc 97 tp'
Error learn.cc: 99 unknown field `tv_usec' of `incomplete struct timeval defined at learn.cc 97'
Error learn.cc: 102 syntax error; found `double' expecting `;'
Error learn.cc: 103 syntax error; found `double' expecting `;'
Error learn.cc: 106 missing parameter type
Error learn.cc: 106 syntax error; found `X' expecting `)'
Error learn.cc: 106 skipping `X' `,'
Error learn.cc: 106 syntax error; found `double' expecting `{'
Error learn.cc: 106 missing identifier
Error learn.cc: 106 too many errors
I guess the reason for the first error is that there is no time.h file in the sys folder. Instead there is timeb.h file. But I don't know the reason to the following errors.
Here are some relative codes:
line 70 int alen = **((int **)a);
line 71 int blen = **((int **)b);
line 86-93 struct data {
collapsed *x;
int num;
int numblocks;
int *blocksizes;
float *regmult;
float *learnmult;
};
line 96-100 void seed_time() {
struct timeval tp;
check(gettimeofday(&tp, NULL) == 0);
srand48((long)tp.tv_usec);
}
line 102 static inline double min(double x, double y) { return (x <= y ? x : y); }
line 103 static inline double max(double x, double y) { return (x <= y ? y : x); }
Can anyone give me a hint?
As far as i can tell, there is nothing wrong with lines 70,71. Are a,b integer double arrays declared and allocated with something like:
int ** a = malloc(4 * sizeof(int*) );
for (int var = 0; var < 4; ++var) {
a[var] = malloc(3*sizeof(int));
}
?
Are you sure that the sys/time.h file can be replaced by sys/timeb.h file? Have you tried?
sys/time.h looks like a pretty linux/unix specific file. Are you sure that the sys/ folder refers to your matlab sys directory (C:\PROGRA~1\MATLAB\R2012b\sys\lcc)?
In general, it looks like you are trying to compile a linux .mex file on a windows machine. For example gettimeofday is a linux pure call (according to this answer):
Equivalent of gettimeday() for Windows

"Client_Text_IO.File_Type must be declard" getting this error in PL/SQL Oracle form

My line of codes are:
PROCEDURE LOAD_DATA IS
FILE_LOG Client_Text_IO.File_Type;
LINE_LOG VARCHAR(32767);
v_txt varchar(32767);
v_counter number(12) := 0;
BEGIN
file_log := Client_Text_IO.fopen(file_upload.origin, 'r');
END;
I am wokring first time with Oracle form. I have no any idea about it. I have almost done my work but I am getting an error at compile time. Complete error description,
Error 201 at line 2, column 11
identifier 'CLIENT_TEXT_IO.FILE_TYPE' must be declared
Error 0 at line 2, column 11
Item ignored
Error 320 at line 12, column 2
the declaration of the type of this expression is incomlete or malformed
Error 0 at line 12, column 2
Statement ignored
Error 320 at line 14, column 3
the declaration of the type of this expression is incomplete or malformed
Error 0 at line 14, column 3
Statement ignored
Error 201 at line 20, column 6
identifier 'V_TEXT' must be declared
Error 0 at line 20, column 3
Statement ignored
Error 320 at line 24, column 24
the declaration of the type of this expression is incomplete or malformed
Error 0 at line 30, column 2
Statement ignored
You need to attach the webutil.pll library to the form.

read .yml files in matlab

I would like to read .yml files in Matlab. These files contain coordinates x and y of key points on a face image. I looked for different tools but I don't seem to find any answers.
My .yml files look like this
YAML:1.0
Image file: "00032009.jpg"
Contours count: 8
Contours:
-
Name: FO
Count: 41
Closed: 0
Points:
-
x: 682.5947265625000000
y: 743.1998901367187500
-
x: 685.9638061523437500
y: 771.3800659179687500
......
and so on
Note 00032009.jpg is an image of a face
x and y are coordinates of a point on a face Eg: the right corner of an eye etc
Could you please point out a way to read the file and then display the points on the face image?
Edit 1: Here is the error I get
Error: File: ReadYamlRaw.m Line: 14 Column: 11
Expression or statement is incorrect--possibly unbalanced (, {, or [.
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
What is weird is line 14 in ReadYamlRaw.m
[pth,~,~]= fileparts(mfilename('fullpath'));
Parse error at ','(second one) and ']' usage appears to be invalid matlab syntax.
So what is the use of ~ in there and why is there an error?
Edit2: I replaced the ~ in the line above with dummy variables then I get this errors O_O
Error using ==> ReadYamlRaw>scan at 81
Unknown data type: logical
Error in ==> ReadYamlRaw>scan_map at 138
result.(ich) = scan(r.get(java.lang.String(ich)));
Error in ==> ReadYamlRaw>scan at 79
result = scan_map(r);
Error in ==> ReadYamlRaw>scan_list at 116
result{ii} = scan(i);
Error in ==> ReadYamlRaw>scan at 77
result = scan_list(r);
Error in ==> ReadYamlRaw>scan_map at 138
result.(ich) = scan(r.get(java.lang.String(ich)));
Error in ==> ReadYamlRaw>scan at 79
result = scan_map(r);
Error in ==> ReadYamlRaw>load_yaml at 48
result = scan(yaml.load(fileread([filename, fileext])));
Error in ==> ReadYamlRaw at 19
result = load_yaml(filename, nosuchfileaction);
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
I also tried with a different yml file that looks like this
%YAML:1.0
RE-C:
x: 919
y: 580
LE-C:
x: 1209
y: 597
N-C:
x: 1063
y: 698
FO-B:
x: 1045
y: 1114
REL-O:
x: 852
y: 597
REL-I:
x: 986
y: 600
REL-T:
x: 918
y: 564
And I get the following errors
Java exception occurred:
while scanning a directive
in "<string>", line 1, column 1:
%YAML:1.0
^
expected alphabetic or numeric character, but found :(58)
in "<string>", line 1, column 6:
%YAML:1.0
^
at org.yaml.snakeyaml.scanner.ScannerImpl.scanDirectiveName(ScannerImpl.java:1028)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanDirective(ScannerImpl.java:990)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDirective(ScannerImpl.java:534)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:251)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179)
at
org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:198)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:399)
Error in ==> ReadYamlRaw>load_yaml at 48
result = scan(yaml.load(fileread([filename, fileext])));
Error in ==> ReadYamlRaw at 19
result = load_yaml(filename, nosuchfileaction);
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
Maybe someone can make something out of these or you could point out another set of functions that would work? I searched but didn't find any except this one.
It's YAML file indeed (as #DavidBrown mentioned in his comment, the extension does not matter). But it has some problems. Don't know if it's due to wrong YAML format or MATLAB implementation.
I've installed YAMLMATLAB and played a little with your file.
YamlStruct = ReadYaml(yaml_file);
YAMLMATLAB returns error if the files is feed as is. It works only if I comment the first line and remove spaces from field names. So the beginning of the file looks like this:
#YAML:1.0
Imagefile: 00032009.jpg
Contourscount: 8
...skipped the rest...
Then I get the correct structure. For example you can access the 1st point's x coordinate as
YamlStruct.Contours{1}.Points{1}.x
ans =
682.5947
UPDATE
Space in filed names is actually a known problem in YAMLMATLAB. See the report and possible solution here.
UPDATE 2
According to comment from #Jirka_cigler (YAMLMATLAB developers group):
In the program release 0.4.3 we added support for whitespaces in field
names, so the problem should not appear again.
Great!
I've also removed previous developers comment on the problem in the first UPDATE since it's not true any more.
ZozaniDB Database Toolbox comes with a Matlab-native YAML implementation that handles the .yml file here. To parse a string or a file, use:
>> yaml_parse ( str )
>> yaml_read ( filename )