Skip to content

Content classified under "Software"

Page 9 of 21

Change a django password manually

May 4, 2016Category: Software
The other day I've been confronted with a strange situation: I forgot the admin password for a django application. I was playing with installing my own pypi repository, I've configured and deployed a test application and, after a couple of weeks, I forgot the password. I tried several times bu I…

Material Drawer and Toolbar Options

April 15, 2016Categories: Software, Tutorial
The latest couple of days I've spent in adding the Excellent Material Drawer to one of my applications. In my case, the drawer is shown on the second activity in the workflow. Below, I'll outline my experiments. Preamble First, the requirements are: An android application with one (or more…

Intercept OkHttpClient Response for Debug

March 16, 2016Category: Software
I wanted to log the data retrieved by OkHttpClient for debugging purposes. After digging for a while, the process seems quite straight-forward now. First, we create the OkHttpClient : Then, we add an interceptor: The interceptor code is: The main thing to remember is that one the response has…

Access Data Files for Local Tests in Android

March 9, 2016Category: Software
TL;DR: Put your data files in test/resources and access it with: I've got an android application with a module performing data processing (HTML scraping in fact). This part is pure java and all its tests are in the src/test path. My particular problem is that I have a set of (large-ish) files…

Use XPath in PL/PGSQL for Batch Processing

March 5, 2016Categories: Software, Tutorial
A while ago I had to process XML loaded in a PostgreSQL database. The task was to extract references from a publication structure. Fortunately, PostgreSQL allows you to use XPath in plpgsql , but there are some things you need to be aware. First, you need to note all namespaces: Then, you can use…

GoogleApiClient .connect() Interface or Class

February 14, 2016Category: Software
TL;DR : If it's your code, check the version play services ( com.google.android.gms:play-services-\* ). If you're using a library, check if the library has a version using play services >= 8.1.0 . If not, you'll need to clone and upgrade it yourself. The other day I got an interesting error coming…

Fix Gradle Error: UNEXPECTED TOP-LEVEL EXCEPTION

February 10, 2016Category: Software
Today I got the lovely UNEXPECTED TOP-LEVEL EXCEPTION from the dexer in android. Looking on the net yielded several causes and resolutions. Note : I'm using Gradle 2.10, Android Studio 2.0.0-beta2 Caching Apparently, sometimes Gradle is shooting itself in the foot with the caching. The first thing…

Add Wear Notifications to Android App

January 24, 2016Category: Software
TL;DR : Use android.support.v4.app notification mechanism. Steps are: Create a WearableExtender: Extend the notification mechanism: Trigger the notification: After reading various sources , I got my application to send notification to my watch using the code above. At the beginning, I thought the…

LibGDX drawPixel has Wrong Colours

January 17, 2016Category: Software
TL;DR: Note that Pixmap.drawPixel(x, y, colour) expects a RGBA8888 colour, even if the pixmap is not RGBA8888 . Today I wanted to create a background with a bunch of different pixels and I had a lot of problems, displaying different colours from what I had in my array. The process is simple…

Create a Background with Vertical Lines of Different Colours

January 17, 2016Category: Software
I've got a list of colours (RGB) in an array and I want to build a background with vertical lines, each representing a colour from my list. The process is too simple to put in a TL;DR :) If my list of colours is, Array<Vector3> cols, then the process is as follows: Create a pixmap: Set one pixel…
PreviousNext

All categories