Changes between Version 94 and Version 95 of FAQ
- Timestamp:
- Feb 23, 2012, 4:03:46 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FAQ
v94 v95 112 112 === I get syntax error ''unexpected name'' when using a floating point number === 113 113 114 * Floating point numbers must ha eva leading zero, for example; "0.9" instead of ".9".114 * Floating point numbers must have a leading zero, for example; "0.9" instead of ".9". 115 115 116 116 === My query which uses ''log'' doesn't work === … … 123 123 for c in (rgb) return count(c.0 = 0) 124 124 }}} 125 '''''Solution''''' : Add 1 to the input:125 '''''Solution''''' (depending on your overall formula): Add 1 to the input: 126 126 {{{ 127 127 for c in (rgb) return encode(log(c.0+1), "jpeg") … … 167 167 If I send the query ''select max_cells(c.0) from rgb as c'' via command line (rasql utility), then the result is 255 as expected; if I send this query via RasJ, then the result is -1. 168 168 169 * Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8 if the 2^7bit is set. Tested, works.169 * Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8^ if the 2^7^ bit is set. Tested, works. 170 170 171 171 === I get class version incompatibility error messages ===