I have a group of coordinates that should be a polygon but sometimes is a multipolygon and I need to check to see what it is:
if (DbGeography.FromText(Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(new System.Data.SqlTypes.SqlChars(json.Polygon.Value), srid).ToString(), srid)
.SpatialTypeName.Equals("Polygon"))
but my problem is that I get this error:
DbGeography.FromText(Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(new System.Data.SqlTypes.SqlChars(json.Polygon.Value), srid).ToString(), srid).SpatialTypeName 'DbGeography.FromText(Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(new System.Data.SqlTypes.SqlChars(json.Polygon.Value), srid).ToString(), srid).SpatialTypeName' threw an exception of type 'System.Reflection.TargetInvocationException' string {System.Reflection.TargetInvocationException}
Part of the if
DbGeography.FromText(Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(new System.Data.SqlTypes.SqlChars(json.Polygon.Value), srid).ToString(), srid)
on watch is:
{SRID=4326;POLYGON ((-0.5504724383354187 51.379008223398628, -0.55046439170837391 51.379009897541955, -0.55100619792938232 51.378588011485647, -0.5504375696182251 51.378588011485647, -0.55017471313476562 51.379023290686426, -0.55046439170837391 51.379009897541955, -0.5504724383354187 51.379008223398628))}
but it cannot get .SpatialTypeName and I don't know what am I doing wrong
Related
I am trying to create listener for implay in Matlab. I would like to observe the change in CurrentFrame Value. It is possible?
This is what I have already tried:
app.myHandle = implay(app.filename1,app.framesPerSecond);
myControls = myHandle.DataSource.Controls;
addlistener( myControls,'DataSource.Controls.CurrentFrame','PostGet',
#(myHandle,event)zmenaFramu(app,event));
But I got instant error:
Error using matlabshared.scopes.source.PlaybackControlsTimer/addlistener
The name 'DataSource.Controls.CurrentFrame' is not an accessible property for an instance of class
'matlabshared.scopes.source.PlaybackControlsTimer'.
Error in pokusnykralik/ButtonPushed (line 81)
addlistener( myControls,'DataSource.Controls.CurrentFrame','PostGet',#(myHandle,event)zmenaFramu(app,event));
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 386)
Error while evaluating Button PrivateButtonPushedFcn.
I tried to name the property as CurrentFrame, myHandle ... but everything was with the same error. Any ideas? Thanks for any advice!
I have a range key field that is also an GSI. Does anybody know how to annotate this attribute with DynamoDBMapper?
FYI, I tried putting both #DynamoDBRangeKey and #DynamoDBIndexHashKey annotations on like below, and it gave an "no RANGE key value present" error while querying data.
#DynamoDBRangeKey(attributeName = POOL_HOST)
#DynamoDBIndexHashKey(attributeName = POOL_HOST,
globalSecondaryIndexName = POOL_HOST_GSI)
String poolhost;
When I write scenario-2 in cucumber+eclipse+appium, there I'm getting null pointer exception.I using webElement and Remotewebdriver in place of Mobilelement and AndroidDriver.
1st try:
driver.findElement(By.xpath("//android.widget.TextView[#text='Choose']")).click();
2nd try:
tabs_list = driver.findElements(By.id("package:id/header_ll"));
tabs_list.get(0).click();
Where I'm not able to click on the view, here only getting Null pointer exception
I am developing an application using Dashdb on Bluemix and nodered, my PHP application uses the call to webservice to invoke the node-red, whenever my function on PHP invokes the node to insert on table and the field GEO_ID is null, the application fails, I understand the issue, it seems the third parameter was not informed, I have just tried to check the param before and passing something like NULL but it continues not working.
See the code:
msg.account_id = msg.req.query.account_id;
msg.user_id = msg.req.query.user_id;
msg.geo_id=msg.req.query.geo_id;
msg.payload = "INSERT INTO ACCOUNT_USER (ACCOUNT_ID, USER_ID, GEO_ID) VALUES (?,?,?) ";
return msg;
And on Dashdb component I have set the parameter as below:
msg.account_id,msg.user_id,msg.geo_id
The third geo_id is the issue, I have tried something like the code below:
if(msg.req.query.geo_id===null){msg.geo_id=null}
or
if(msg.req.query.geo_id===null){msg.geo_id="null"}
The error I got is the one below:
dashDB query node: Error: [IBM][CLI Driver][DB2/LINUXX8664] SQL0420N Invalid character found in a character string argument of the function "DECIMAL". SQLSTATE=22018
I really appreciate if someone could help me on it .
Thanks,
Eduardo Diogo Garcia
Is it possible that msg.req.query.geo_id is set to an empty string?
In that case neither if statement above would get executed, and you would be trying to insert an empty string into a DECIMAL column. Maybe try something like this:
if (! msg.req.query.geo_id || msg.req.query.geo_id == '') {
msg.geo_id = null;
}
It seems the exception stacktrace in iOS only contains the method name or there is a bug. Below is my code of handling exceptions in JSContext.
context.exceptionHandler = { (ctx: JSContext!, value: JSValue!) in
// type of String
let stacktrace = value.objectForKeyedSubscript("stack").toString()
// type of Number
let lineNumber = value.objectForKeyedSubscript("line")
// type of Number
let column = value.objectForKeyedSubscript("column")
let moreInfo = "in method \(stacktrace)Line number in file: \(lineNumber), column: \(column)"
Logger.error("JS ERROR: \(value) \(moreInfo)")
}
And I got logs like below
ERROR : JSContextRenderer.swift:308 : setupContext : JS ERROR: Error in method clearBackground
Line number in file: 162, column: 12"
Note there is a new line right after the "clearBackground" name, I think there probably more information there.
Can anybody having similar experience confirm? Any help is appreciated. Thanks.
Looks like it does show more information in the stack. Here is one of the log information I got:
JS ERROR: TypeError: undefined is not a function (evaluating 'msg.__assert__()') in method assert
syncShots
updateSync
initSync
setState
onLogicStateChanged
onLogicStateChanged
[native code]
updateMove
sendMove
shoot
onTouchUp
[native code]
_handleEvent
_dispatchEvent
. Line number in file: 183, column: 20
Long ago, #igrek asked where the keys in value come from. They're part of the Error object that was thrown by the JavaScript engine, and that now appears as value in the native error handler callback. What exactly Error includes depends on the implementation, but typically includes message, fileName, and lineNumber. It appears that stack is also supported. More details on the MDN page for Error .