Re: Re: [OGNL] Mask operators
@Daniel: Of course I do not use OGNL for only selecting an entry from a simple Map. My application uses OGNL for navigating thru a complex (unknown) graph and doing calculations based on the values inside the graph. I just gave a simple example to explain my needs... @Chris: I have tried this already. If I write Ognl.getValue(\a-b\, m), OGNL interprets 'a-b' as a String and returns it instead of trying to get the value for the 'a-b'-key from m. Thanks, Stephan Daniel Pitts coloraura@gmail.com schrieb am 05.03.2012 21:09:41: Von: Daniel Pitts coloraura@gmail.com An: Commons Users List user@commons.apache.org Kopie: Commons Users List user@commons.apache.org Datum: 05.03.2012 21:34 Betreff: Re: [OGNL] Mask operators Or more simply m.get(a-b) :-) OGNL is a great tool. But don't use it where it doesn't help. Thanks, Daniel. Sent from my iPhone On Mar 5, 2012, at 8:20 AM, Chris Pratt thechrispr...@gmail.com wrote: Try getValue(\a-b\); (*Chris*) On Mar 5, 2012 4:54 AM, stephan.dco...@arz.at wrote: Is there a way to mask operators in ognl so that they do not get interpreted as operators? Example: I have a Map m which contains a key 'a-b' If I write Ognl.getValue(a-b, m), Ognl tries to find a and b inside the map and subtracts b from a. But what I want is to get the key named 'a-b'. I already tried to use a backslash: Ognl.getValue(a\\-b, m) but this is not accepted by Ognl (Malformed OGNL expression). Any ideas? Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee.
Re: Re: [OGNL] Mask operators
This should be work: Ognl.getValue( ['a-b'],m ) Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 6 March 2012 09:10, stephan.dco...@arz.at wrote: @Daniel: Of course I do not use OGNL for only selecting an entry from a simple Map. My application uses OGNL for navigating thru a complex (unknown) graph and doing calculations based on the values inside the graph. I just gave a simple example to explain my needs... @Chris: I have tried this already. If I write Ognl.getValue(\a-b\, m), OGNL interprets 'a-b' as a String and returns it instead of trying to get the value for the 'a-b'-key from m. Thanks, Stephan Daniel Pitts coloraura@gmail.com schrieb am 05.03.2012 21:09:41: Von: Daniel Pitts coloraura@gmail.com An: Commons Users List user@commons.apache.org Kopie: Commons Users List user@commons.apache.org Datum: 05.03.2012 21:34 Betreff: Re: [OGNL] Mask operators Or more simply m.get(a-b) :-) OGNL is a great tool. But don't use it where it doesn't help. Thanks, Daniel. Sent from my iPhone On Mar 5, 2012, at 8:20 AM, Chris Pratt thechrispr...@gmail.com wrote: Try getValue(\a-b\); (*Chris*) On Mar 5, 2012 4:54 AM, stephan.dco...@arz.at wrote: Is there a way to mask operators in ognl so that they do not get interpreted as operators? Example: I have a Map m which contains a key 'a-b' If I write Ognl.getValue(a-b, m), Ognl tries to find a and b inside the map and subtracts b from a. But what I want is to get the key named 'a-b'. I already tried to use a backslash: Ognl.getValue(a\\-b, m) but this is not accepted by Ognl (Malformed OGNL expression). Any ideas? Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee.
Re: [Collections] Circular Buffer
what exactly are you trying to do? Perhaps a circular buffer isn't what you're looking for. On Mar 6, 2012 1:48 AM, manoj mokashi manojmoka...@gmail.com wrote: The existing CircularFifoBuffer would suffice if it had an efficient get(index) method, which gets an element with the specified index from the end. btw, the code i posted originally refers mistakenly to another Int Buffer class and is not correct. Also the IllegalArgumentCheck and the fill constructor needs changing. Sorry about that. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Antwort: Re: Re: [OGNL] Mask operators
Thanks Maurizio, this works perfectly! If somebody else needs this: Use parentheses if you need this inside a longer path (data graph), i.e. Ognl.getValue( keyInOuterMap.(['a-b']).keyInNestedMap,m ) maurizio.cucchi...@gmail.com schrieb am 06.03.2012 10:54:36: Von: Maurizio Cucchiara mcucchi...@apache.org An: Commons Users List user@commons.apache.org Datum: 06.03.2012 11:36 Betreff: Re: Re: [OGNL] Mask operators Gesendet von: maurizio.cucchi...@gmail.com This should be work: Ognl.getValue( ['a-b'],m ) Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 6 March 2012 09:10, stephan.dco...@arz.at wrote: @Daniel: Of course I do not use OGNL for only selecting an entry from a simple Map. My application uses OGNL for navigating thru a complex (unknown) graph and doing calculations based on the values inside the graph. I just gave a simple example to explain my needs... @Chris: I have tried this already. If I write Ognl.getValue(\a-b\, m), OGNL interprets 'a-b' as a String and returns it instead of trying to get the value for the 'a-b'-key from m. Thanks, Stephan Daniel Pitts coloraura@gmail.com schrieb am 05.03.2012 21:09:41: Von: Daniel Pitts coloraura@gmail.com An: Commons Users List user@commons.apache.org Kopie: Commons Users List user@commons.apache.org Datum: 05.03.2012 21:34 Betreff: Re: [OGNL] Mask operators Or more simply m.get(a-b) :-) OGNL is a great tool. But don't use it where it doesn't help. Thanks, Daniel. Sent from my iPhone On Mar 5, 2012, at 8:20 AM, Chris Pratt thechrispr...@gmail.com wrote: Try getValue(\a-b\); (*Chris*) On Mar 5, 2012 4:54 AM, stephan.dco...@arz.at wrote: Is there a way to mask operators in ognl so that they do not get interpreted as operators? Example: I have a Map m which contains a key 'a-b' If I write Ognl.getValue(a-b, m), Ognl tries to find a and b inside the map and subtracts b from a. But what I want is to get the key named 'a-b'. I already tried to use a backslash: Ognl.getValue(a\\-b, m) but this is not accepted by Ognl (Malformed OGNL expression). Any ideas? Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee. Disclaimer: Diese Nachricht dient ausschließlich zu Informationszwecken und ist nur für den Gebrauch des angesprochenen Adressaten bestimmt. This message is only for informational purposes and is intended solely for the use of the addressee.
[sanselan] Writing EXIF data to JPEG
Hi Sanselan. I have a hard time finding out how to use Sanselan. Suppose I have some JPEG picture which I want to add some attributes to. If for example I want to add some user comment or date I try this: TiffOutputSet outputSet = new TiffOutputSet(); TiffOutputField dateTaken = TiffOutputField.create(TiffConstants.EXIF_TAG_CREATE_DATE, outputSet.byteOrder, 2003:03:29 17:47:50); TiffOutputField comment = TiffOutputField.create(TiffConstants.EXIF_TAG_IMAGE_DESCRIPTION, outputSet.byteOrder, This is a test!); However, both of these fails on unexpected data type. If I am not supposed to give a String, then what I am supposed to supply? I hope you can help with these, probably noobish questions. /Kasper - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org