Gradle from behind a proxy, part deux

In July I wrote a post documenting how to build a project in Android Studio from behind a proxy. Essentially you need to tell Gradle Studio your proxy settings. As of updating to Android Studio 1.0, the issue has come back! After a combination of swearing and research I’ve found the missing necessary steps. So the new definitive steps for getting Gradle working from behind a proxy Navigate to the… Read More »Gradle from behind a proxy, part deux

Exposing a VM on hosted WiFi hotspot for Google Glass

Background Google Glass is famously frustrating to connect to a WiFi network. It doesn’t handle captive portals, or WiFi using Enterprise WPA2. I’ve also had consistent issues using MyGlass and QR codes to connect to Wifi. I found myself in a situation where I had to connect Glass to a WiFi network on which a virtual machine was visible. My work’s corporate network was out of the question – it uses… Read More »Exposing a VM on hosted WiFi hotspot for Google Glass

How to invoke a SAS macro stored in a catalog

Having not done the Advanced Base SAS certification, this was a nightmare to work out. I’m documenting it here for my own future use, and to help anyone else who found themselves in the same situation as me. What situation was that? SAS Social Network Analysis can create networks from input data, and to do so it makes use of a pre-compiled “link macro” which is bundled with SNA. This… Read More »How to invoke a SAS macro stored in a catalog

Removing duplicate rows in base SAS

If you ever need to remove duplicate rows from a SAS dataset, here’s an approach I use quite often. Get your data. Let’s assume it’s in the following format: – ID Name 123 John 456 Bob 123 John Sort your data. – /* Step 1 – Sort data */ proc sort data=my_lib.my_dataset; /* Sort by a field which you want to be unique, and which will be the same for duplicate… Read More »Removing duplicate rows in base SAS

Debugger this! Debugging an Android Service

I recently found out that I couldn’t hit any breakpoints in an Android Service I was developing. I found that this was easily sorted by adding the following line: android.os.Debug.waitForDebugger() This approach was suggested on various websites including StackOverflow and HelloAndroid amongst many. Great. I found out much later than when I ran the code “in the wild” i.e. in a production environment unattached to a debugger, my application was… Read More »Debugger this! Debugging an Android Service

Android Studio – Fix sudden unresolved symbols

Android Studio is a fickle beast. At times surprisingly clever and useful, and other times a flaky nightmare. The most recent issue I came across was when a Google Glass project suddenly stopped building with unresolved symbol errors. This manifests itself as all your “com.google.android.glass.*” imports failing, and the resulting use of any object from those libs causing compilation errors. How to fix it Eventually I checked my project dependencies… Read More »Android Studio – Fix sudden unresolved symbols

Using Gradle from behind a proxy

By default Android Studio uses Gradle to build Android projects. This means Android Studio always needs a connection to the internet to check for and retrieve dependencies. If you’re developing from behind a proxy (as I am) then you’ll have to explicitly tell Gradle the proxy details to allow it to connect to its servers. Steps to fix Navigate to the “.gradle” folder in your user directory (e.g. C:\Users\bob\.gradle) Create a “gradle.properties” file… Read More »Using Gradle from behind a proxy

Google Glass, Eye Love You

Having done a bit of research on what apps people are starting to develop for Google Glass, I stumbled on word of a recent Glass Hackathon where, among other things, an app was built to measure attraction: It uses an eye tracker, mounted on the Glass frame, to measure the pupil dilation of the wearer. The idea is to measure someone’s arousal, giving an instant measure of how attracted they are to… Read More »Google Glass, Eye Love You

How to remove security from a PDF

I recently sat through an eLearning course which involved reading through a 1300-page PDF file. Instead of deforesting the Glasgow area to provide the requisite amount of paper for printing, I thought I’d read and annotate it on-screen (something I wouldn’t recommend unless it’s to save the environment) Annoyingly, annotation is prevented on PDFs with security applied, so I had to find a way around it. Firstly note that if… Read More »How to remove security from a PDF