Posts

Showing posts from March, 2013

Nokia Maps rendering issue using IE8 & Twitter Bootstrap

Image
Today at work we had the problem where a standard Nokia map, with a pointer would not render the map images, the overlay controls where there, such as the zoom and view type etc, but it would just show a white background. See image below: Nokia Maps not rendering correctly in Internet Explorer 8 As you can probably guess, this only becomes a problem when using Internet Explorer 8 or lower. Since there isn't really a good spread of knowledge on Google when it comes to Nokia maps. We needed to fix this one ourselves. The Solution To cut a long story short, we were using the Twitter Bootstrap HTML5 framework and the problem was down to this bit of CSS in bootstrap.css img { width: auto\9; height: auto; max-width: 100%; vertical-align: middle; border: 0; -ms-interpolation-mode: bicubic; } The max-width: 100% was the culprit, I believe this is used by the Bootstrap responsive element to resize images when the viewport changes. Using the following conditional

Error Using Python Requests Library - TypeError: 'dict' object is not callable

A recent task at work was to generate a Python class that could be used by developers to interact with our API. One of the methods in that class was to do a curl call to our API. For this i used the very nice Requests Library  and since our API returns output in JSON, i used the: r.json()  function to return the output. This worked fine on my Mac, but when this was tested on a Windows machine it returned the following error: line 68, in doCurl    print r.json()  TypeError: 'dict' object is not callable The solution, or so I thought was to use:   r.json As documented in the Love Python blog article. This worked wonders for the Windows machine, but as a consequence, it made my Mac spit out the following: <bound method Response.json of <Response [200]>> Since Python is not one of my strongest languages, (I've only been learning it for a few days!) I have no solution as to why this is happening and how to fix it. In the end I settled for us

PayPal OAuth Intergration - IDSW_333 - there may be missing request parameters or this site is not approved to use

At work today I was tasked with setting up a Login with PayPay type of app, where, instead of filling out a registration form, you just login with an existing account, you've probably seen this type of thing with Facebook and Twitter, well the PayPal one is just the same. However when it came to passing the user over to PayPal to login, i received the following error message: IDSW_333 - there may be missing request parameters or this site is not approved to use After checking all my parameters, I could find nothing wrong. A Quick Google search found people have had the same problem, but it was mostly to do with using OpenId 1.0/2.0 and having to use OAuth 2.0 / Open ID Connect instead. This was never a problem for me since I was already using OAuth 2.0. The Solution In order to fix the annoying error message I simply deleted my existing app and created a new one, making sure I updated my App ID and App Secret in my program. This worked first time and allowed