Upload images to Imgur from Mathematica

A little bird just informed me of a Mathematica solution to this question (the underlying implementation still uses JLink, but this answer hides all the java related code): imgur[expr_] := Module[ {url, key, image, data, xml, imgurUrl}, url = “http://api.imgur.com/2/upload”; key = “c07bc3fb59ef878d5e23a0c4972fbb29”; image = Fold[ExportString, expr, {“PNG”, “Base64”}]; xml = Import[url, “XML”, “RequestMethod” -> … Read more

The type List is not generic; it cannot be parameterized with arguments [HTTPClient]

Your import has a subtle error: import java.awt.List; It should be: import java.util.List; The problem is that both awt and Java’s util package provide a class called List. The former is a display element, the latter is a generic type used with collections. Furthermore, java.util.ArrayList extends java.util.List, not java.awt.List so if it wasn’t for the … Read more

Deserializing polymorphic json classes without type information using json.net

You can do this fairly easily by creating a custom JsonConverter to handle the object instantiation. Assuming you have your classes defined something like this: public abstract class GalleryItem { public string id { get; set; } public string title { get; set; } public string link { get; set; } public bool is_album { … Read more

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