Illegal mix of collations for operation 'concat' after replace chinese - mysql

Before:
set extrainfo =concat('{"from":"carpool","table":"Block",
"key_field":"b_index","key_value:"',b_index,'","infoid":"',info_id,'",
"code":"0","message":"This trip is valid"}');
run success.
I replaced "This trip is valid" with "行程符合规范" :
set extrainfo =concat( '{"from":"carpool","table":"Block","key_field":
"b_index","key_value:"',b_index,'","infoid":"',info_id,'",
"code":"0","message":"行程符合规范"}');
show me:
(node:30849) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1):
`enter code here`Error: ER_CANT_AGGREGATE_NCOLLATIONS:
`enter code here`Illegal mix of collations for operation 'concat'
Can you help me?

I changed Codes:
set extrainfo =concat( '{"from":"carpool","table":"Block","key_field":
"b_index","key_value:"',convert(b_index,char),'","infoid":"',convert(info_id,char),'",
"code":"0","message":"行程符合规范"}');
replace b_index with convert(b_index,char). It works well.

Related

ITK(in ANTs) occurs error : no orthonormal definition found

ANTs open source provides transform functions that can move(frequently referred as normalizing or registration in neuroscience) one's brain MR image to other's brain MR image.
But I got an error below : not all MR images but some MR images make below error. There NEVER exist any differences when I opened those MR images with image viewer like ITK-snap. It seems centain MR images that occurs those error must have mathematical or algebraic differences with images that does not occur error. How can I find out what the problem is?
Error message:
/opt/ANTs/bin/antsRegistrationSyNQuick.sh: line 464:
[[: _MR.nii: syntax error: invalid arithmetic operator (error token is
".nii")
antsRegistration call:
/opt/ANTs/bin//antsRegistration --verbose 1 --dimensionality 3 --float 0 --collapse-output-transforms 1 --output [ T1xPET,T1xPETWarped.nii.gz,T1xPETInverseWarped.nii.gz ]
--interpolation Linear --use-histogram-matching 0 --winsorize-image-intensities [ 0.005,0.995 ] --initial-moving-transform [ _MR.nii,_FBB.nii,1 ] --transform Rigid[ 0.1 ] --metric MI[ _MR.nii,_FBB.nii,1,32,Regular,0.25 ] --convergence [ 1000x500x250x0,1e-6,10 ] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox
Output:
All_Command_lines_OK Using double precision for computations.
Exception caught during reference file reading
itk::ExceptionObject (0x5559bfd38530) Location: "unknown" File:
/home/nuc/Desktop/a/build/ITKv5/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
Line: 1980
Description: ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found!
file _MR.nii Exception Object caught:
itk::ExceptionObject (0x5559bfd38530) Location: "unknown" File:
/home/nuc/Desktop/a/build/staging/include/ITK-5.2/itkCenteredTransformInitializer.hxx
Line: 40
Description: ITK ERROR: CenteredTransformInitializer(0x5559bfd22e10): Fixed Image has not been set
The short explanation is that the nifti image has unexpected metadata. Perhaps damaged? Or the writing library is buggy? Or some extension to the standard is assumed?
The exception is thrown in NIFTI reader code. You can look at the preceding code to see all the checks made against the orientation matrix before the exception is reached.

Command raised an exception: OperationalError: near "<": syntax error sqlite3 discord.py

cursor.execute(f"UPDATE blackasjackas SET pirmas_korta = {pirmas_korta} WHERE userid={ctx.author.id}")
I'm having a problem with this line, it's giving me the operationalerror near "<" and I can't seem to figure out how to fix it
pirmas_korta returns a string "<:2H:804013503354634280>"
I'm not a python specialist, but SQL-standart requires strings to be apostrophed, so since pirmas_korta is some kind of a string value, update statement should look like the following
f"UPDATE blackasjackas SET pirmas_korta = '{pirmas_korta}' WHERE userid={ctx.author.id}"

Why the model "FourierAnalysis" does not run on OpenModelica? error: lvalue required as unary '&' operand

The test model "TestSine" from the package "Sensors.Tests.FourierAnalysis" from the Xogeny library: https://github.com/xogeny/Sensors does not run on OpenModelica.
The error message is: "error: lvalue required as unary '&' operand". In the C-file generated by OpenModelica, the message error is about this lines:
infoStreamPrint(LOG_EVENTS, 0, "reinit $Panalysis$Pai$lB1$rB = %f", 0.0);
copy_real_array_data_mem(&0.0, &$Panalysis$Pai$lB1$rB);
I don't understand this message and I want to use the block "FourierAnalysis" with OpenModelica.
It was an implementation bug in OpenModelica; it has been fixed in r22261.
Note: Bug reports should ideally be reported to https://trac.openmodelica.org/OpenModelica/newticket

BreezeJs and Chrome 33

BreezeJS throws the following error on Chrome:
[Q] Unhandled rejection reasons (should be empty):
["Error: Illegal construction - use 'or' to combine …tp://localhost:6592/Scripts/breeze.min.js:5:9573)"]
0: "Error: Illegal construction - use 'or' to combine checks↵ at m (localhost:6592/Scripts/breeze.min.js:1:11658)↵ at r.isOptional (localhost:6592/Scripts/breeze.min.js:1:13100)↵ at k.getKey (localhost:6592/Scripts/breeze.min.js:2:5019)↵ at M [as _$interceptor] (localhost:6592/Scripts/breeze.min.js:1:7492)↵ at a.splice.h.computed.write (localhost:6592/Scripts/breeze.min.js:5:30754)↵ at dependentObservable [as id] (localhost:6592/Scripts/knockout-2.3.0.debug.js:1298:31)↵ at a.setProperty (localhost:6592/Scripts/breeze.min.js:5:31148)↵ at localhost:6592/Scripts/breeze.min.js:3:11420↵ at Array.forEach (native)↵ at q._updateTargetFromRaw (localhost:6592/Scripts/breeze.min.js:3:11058)↵ at k (localhost:6592/Scripts/breeze.min.js:5:9573)"
1: "Error: Illegal construction - use 'or' to combine checks↵ at m (localhost:6592/Scripts/breeze.min.js:1:11658)↵ at r.isOptional (localhost:6592/Scripts/breeze.min.js:1:13100)↵ at k.getKey (localhost:6592/Scripts/breeze.min.js:2:5019)↵ at M [as _$interceptor] (localhost:6592/Scripts/breeze.min.js:1:7492)↵ at a.splice.h.computed.write (localhost:6592/Scripts/breeze.min.js:5:30754)↵ at dependentObservable [as id] (localhost:6592/Scripts/knockout-2.3.0.debug.js:1298:31)↵ at a.setProperty (localhost:6592/Scripts/breeze.min.js:5:31148)↵ at localhost:6592/Scripts/breeze.min.js:3:11420↵ at Array.forEach (native)↵ at q._updateTargetFromRaw (localhost:6592/Scripts/breeze.min.js:3:11058)↵ at k (localhost:6592/Scripts/breeze.min.js:5:9573)"
length: 2
proto: Array[0]
Updated 3/1/2014
Ok, we think that this is fixed in Breeze v 1.4.9 ( or later) available now.
Previous post
This is a problem that we have been tracking. It appears to occur only on the minified version of Breeze in Chrome 33. We are planning a fix for later this week. Until then try using the unminified version.

Visualworks Cincom Smalltalk SUnit Test case for error condition

I have this piece of code.
|temp|
temp := 5
(temp < 3) ifFalse:[
self error: 'Invalid input'.
].
What will a SUnit test case look like, if I have to test that the above error is raised when I run this code?
Currently when I run the above code, it says "Unhandled exception: Invalid input"
How can I handle this exception?
Try this:
testError
|temp|
temp := 5.
self
should: [(temp < 3) ifFalse:[
self error: 'Invalid input']]
raise: Error