How to get static image url from flickr URL?

With specifying extras=url_o you get a link to the original image: https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=YOURAPIKEY&format=json&nojsoncallback=1&text=cats&extras=url_o For downscaled images, you use the following parameters: url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l Alternatively, you can construct the URL as described: http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg or http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg

Custom JSON Deserialization with Jackson

You can write custom deserializer for this class. It could look like this: class FlickrAccountJsonDeserializer extends JsonDeserializer<FlickrAccount> { @Override public FlickrAccount deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { Root root = jp.readValueAs(Root.class); FlickrAccount account = new FlickrAccount(); if (root != null && root.user != null) { account.setId(root.user.id); if (root.user.username != null) { account.setUsername(root.user.username.content); } … Read more

How to get MD5 sum of a string using python?

You can do the following: Python 2.x import hashlib print hashlib.md5(“whatever your string is”).hexdigest() Python 3.x import hashlib print(hashlib.md5(“whatever your string is”.encode(‘utf-8′)).hexdigest()) However in this case you’re probably better off using this helpful Python module for interacting with the Flickr API: http://stuvel.eu/flickrapi … which will deal with the authentication for you. Official documentation of hashlib

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)