G4GDMLParser Evaluator : syntax error C++ - c++

I am trying to read a GDML file with G4GDMLParser:
...
G4GDMLParser parser;
parser.Read(G4Str_Filename, fValidate);
But it gives an error:
...
G4GDML: Reading materials...
G4GDML: Reading solids...
Evaluator : syntax error
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : InvalidExpression
issued by : G4GDMLEvaluator::Evaluate()
Error in expression: 40.0
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment
-------- EEEE -------- G4Exception-END --------- EEEE -------
*** G4Exception: Aborting execution ***
Signal: SIGABRT (Aborted)
I tried putting GDML file next to the executable but it didnt help.

I found it problem is My locale TR uses " , "not " . " for floats just set your locale somewhere in your code;
std::setlocale(LC_ALL, "en_US.UTF-8");
std::setlocale(LC_NUMERIC, "en_US.UTF-8");

Related

FIX IT INFORMATICA Error TT_11019 There is an error in the port [port_name]:

"My Mapping is going down with the error message code :TT_11019" and the Mapping logic is as stated below
#
Source1(DB2)------> SOURCE QUALIFIER--->Expression_Trsnfm->TGT_Flat_file
Source2(DB2)------>
As of Now I have verified the source data
STEP1: DATA looks good from the two DB2 SOURCES
STEP2: Found that The data from Source qualifier to Expression
transformation populating NULL records DO know HOW Till the source
qualifier data looks perfect
STEP3: Research on session properties looks GOOD I HOPE
Severity Timestamp Node Thread Message Code Message
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TT_11019 There is an error in the port [EMP_ID]: The default
value for the port is set to: ERROR(Transformation error:
exp_INSTANCE).
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TT_11023 An error occurred converting data in the port
[EMP_ID]. The row was dropped.
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TT_11021 An error occurred moving data from the transformation
exp_INSTANCE: to the transformation EX655_KEY_FILE.
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
CMN_1086 exp_INSTANCE: Number of errors exceeded threshold [1].
INFO 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
CMN_1053 : Rowdata: ( RowType=-4(error but dropped due to
abort) Src Rowid=3 Targ Rowid=3
EMP_ID (EMP_ID:Int:): "(NULL)"
MANGER_ID (MANAGER_ID:UniChar.17:): "20190917174013514"
DEPT_ID (DEPT_ID:Int:): "(NULL)"
OUT_XYZ_ID (XYZ_ID:UniChar.44:): " "
OUT_MU_PARTY_BUSN_ID (MU_PARTY_BUSN_ID:Int:): "0"
BUSN_ID (BUSN_ID:Int:): "2435126"
OUT_MOBILE_NUM (MOBILE_NUM:UniChar.30:): " "
OUT_STATE_CD (STATE_CD:UniChar.6:): " "
HIRE_DT (HIRE_DT:UniChar.10:): "(NULL)"
OUT_DIST_TYP_CD (DIST_TYP_CD:UniChar.1:): " (TRUNCATED)"
STATE_NO (STATE_NO:UniChar.2:): "16"
STATUS_ID (QUOTE_APP_STATUS_ID:UniChar.2:): "CQ"
SECTOR_TYP_CD(APP_TYPE_CD:UniChar.1:): "N"
VACANCY_IND (PLCY_INQ_QUOTE_IND:UniChar.1:): "U"
OUT_JOIN_DT (JOIN_DT:UniChar.10:): "01/01/0001(TRUNCATED)"
OUT_EFF_DT (EFF_DT:UniChar.10:): "(NULL)"
REGION_ID(REGION_ID:Int:): "2430919"
)
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TM_6085 A fatal error occurred at transformation [exp_INSTANCE], and
the session is terminating.
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TM_6085 A fatal error occurred at transformation
[SQ_DB2SRC1_DB2SRC2], and the session is terminating.
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i TRANSF_1_1_1
TM_6085 A fatal error occurred at transformation
[SQ_DB2SRC1_DB2SRC2], and the session is terminating.
INFO 10/21/2019 9:37:05 PM car_nod_exyz124i WRITER_1_*_1
WRT_8333 Rolling back all the targets due to fatal session
error.
ERROR 10/21/2019 9:37:05 PM car_nod_exyz124i WRT_8170
Writer run terminated: Abort Session request received from the DTM*
"I would like to resolve this issue and want to know the root cause"
Is your port EMP_ID a NOT NULL field? If so, it seems you are trying to load a NULL value in it.

Execute C++ code in R

I am trying to execute c++ function using boost library in R. I've also installed boost header file package (BH). When I try to execute the code it give me the following error:
src <- '
#include <Rcpp.h>
#include <boost/math/special_functions/binomial.hpp>
for (unsigned long i = 0; i < 5; ++i) {
boost::math::binomial_coefficient<double>(25, i);
}'
sillyExp <- cfunction(signature(), src, convention = ".C")
Where I am going wrong?
Edit: Following is the error
Error in compileCode(f, code, language, verbose) : 
  Compilation ERROR, function(s)/method(s) not created! file68b0697546bd.cpp:11:54: fatal error: boost/math/special_functions/binomial.hpp: No such file or directory
 #include <boost/math/special_functions/binomial.hpp> 
                                                      ^
compilation terminated.
make: *** [C:/PROGRA~1/R/R-34~1.3/etc/x64/Makeconf:215: file68b0697546bd.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-34~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-34~1.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file68b0697546bd.dll" WIN=64 TCLBIN=64 OBJECTS="file68b0697546bd.o"' had status 2 
If you really want to execute some C++ code, then you can use Rcpp::evalCpp:
Rcpp::evalCpp("boost::math::binomial_coefficient<double>(25, 3)",
depends="BH",
include="#include <boost/math/special_functions/binomial.hpp>")
#> [1] 2300

Cocos2d crash on iOS9 simulator

2015-10-26 21:30:19.093 QP[4494:55623] 39:
OpenGL error GL_INVALID_VALUE detected at -[CCGraphicsBufferGLUnsynchronized setup] 121
2015-10-26 21:30:19.096 QP[4494:55623] *** Assertion failure in -[CCRenderStateGL initWithBlendMode:shader:shaderUniforms:copyUniforms:], /Users/quantum/code/fuck/quantumpilot/qp/Source/libs/cocos2d-iphone/cocos2d/CCRendererBasicTypes.m:313
2015-10-26 21:30:19.139 QP[4494:55623] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CCRenderState: Shader is nil'
Why is this happening? Works fine on my 8.4.1 device. Will test on 9.1 device.
EDIT
From http://forum.cocos2d-objc.org/t/xcode-7-ios9-beta/17346/20
added to static NSString *CCShaderHeader in CCShader.m
#"#ifdef GL_ES\n"
#"#ifdef GL_OES_standard_derivatives\n"
#"#extension GL_OES_standard_derivatives : enable\n"
#"#endif\n"
#"#endif\n"
removed from CCDrawNode.m
#"#ifdef GL_ES\n"
#"#extension GL_OES_standard_derivatives : enable\n"
#"#endif\n"
#"\n"
fixes it. Arcane.

Popup in BlackBerry 10

How do I show a popup in Blackberry 10? I want to show popup when any contact is added /deleted/updated. I took one method like this---
void ContactEditor::showToast(QString text) {
bb::system::SystemToast toast;
toast.setBody(text);
toast.setPosition(bb::system::SystemUiPosition::MiddleCenter);
toast.exec();
}
and called like this---
showToast("contact added...");
included file for System Toast also.
but this is giving me error----
make[2]: *** [o-g/addressbook] Error 1
make[1]: *** [debug] Error 2
make: *** [Simulator-Debug] Error 2
can somebody tell me whats the problem ?
Add LIBS += -lbbsystem to your application pro file. and include
#include <bb/system/SystemToast>
SystemToast *toast = new SystemToast(this);
toast->setBody("Your Toast");
toast->setPosition(SystemUiPosition::MiddleCenter);
toast->show();

pig REPLACE gives error

Let's assume that my file is named 'data' and looks like this:
2343234 {23.8375,-2.339921102} {(343.34333,-2.0000022)} 5-23-2013-11-am
I need to convert the 2nd field to a pair of coordinate numbers. So I wrote the follwoing code and called it basic.pig:
A = LOAD 'data' AS (f1:int, f2:chararray, f3:chararray. f4:chararray);
B = foreach A generate STRSPLIT(f2,',').$0 as f5, STRSPLIT(f2,',').$1 as f6;
C = foreach B generate REPLACE(f5,'{',' ') as f7, REPLACE(f6,'}',' ') as f8;
and then used (float) to convert the string to a float. But, the command 'REPLACE' fails to work and I get the following error:
-bash-3.2$ pig -x local basic.pig
2013-06-24 16:38:45,030 [main] INFO org.apache.pig.Main - Apache Pig version 0.11.1 (r1459641) compiled
Mar 22 2013, 02:13:53 2013-06-24 16:38:45,031 [main] INFO org.apache.pig.Main - Logging error messages to: /home/--/p/--test/pig_1372117125028.log
2013-06-24 16:38:45,321 [main] INFO org.apache.pig.impl.util.Utils - Default bootup file /home/isl/pmahboubi/.pigbootup not found
2013-06-24 16:38:45,425 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
2013-06-24 16:38:46,069 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
Details at logfile: /home/--/p/--test/pig_1372117125028.log
And this is the details of the pig_137..log
Pig Stack Trace
---------------
ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
org.apache.pig.tools.pigscript.parser.TokenMgrError: Lexical error at line 7, column 0. Encountered: <EOF> after : ""
at org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager.getNextToken(PigScriptParserTokenManager.java:3266)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.jj_ntk(PigScriptParser.java:1134)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:104)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
at org.apache.pig.Main.run(Main.java:604)
at org.apache.pig.Main.main(Main.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
================================================================================
I've got data like this:
2724 1919 2012-11-18T23:57:56.000Z {(33.80981975),(-118.105289)}
2703 6401 2012-11-18T23:57:56.000Z {(55.83525609),(-4.07733138)}
1200 4015 2012-11-18T23:57:56.000Z {(41.49609152),(13.8411998)}
7104 9227 2012-11-18T23:57:56.000Z {(-24.95351118),(-53.46538723)}
and I can do this:
A = LOAD 'my_tsv_data' USING PigStorage('\t') AS (id1:int, id2:int, date:chararray, loc:chararray);
B = FOREACH A GENERATE REPLACE(loc,'\\{|\\}|\\(|\\)','');
C = LIMIT B 10;
DUMP C;
This error
ERROR 1000: Error during parsing. Lexical error at line 7, column 0. Encountered: <EOF> after : ""
came to me because I had used different types of quotation marks. I started with ' and ended with ´ or `, and it took quite a while to find what went wrong. So it had nothing to do with line 7 (my script was not so long, and I shortened data to four lines which naturally did not help), nothing to do with column 0, nothing to do with EOF of data, and hardly anything to do with " marks which I didn't use. So quite misleading error message.
I found the cause by using grunt - pig command shell.