Skip to content

Content classified under "Software"

Page 8 of 21

Get all Proposal Names from the Participant Portal

October 25, 2016Categories: Software, Tutorial
I've found out the participant portal for H2020 offers an API . This is quite neat as one can integrate with the data, e.g. by reading and listing the calls. I've written a proof of concept to list all calls from this and last years. First, we load the data in a JSON object: Then, we extract the…

Inject Proxy Settings in Selenium/Chrome

October 24, 2016Categories: Software, Tutorial
I have the following situation: I'm behind a corporate proxy and I need to run a test accessing an external website. To do this, I've picked up chrome/chromium as driver of choice. My current solution implies an authentication via plugin. The plugin The chrome plugin is essentially 2 files: a…

BIOS Loads from 0x7c00

September 21, 2016Categories: Software, Tutorial
Today I was investigating a bug where a simple program wasn't executing properly. It emerged that BIOS loads the code from the MBR at 0x7c00 . Relevant info reproduced here: The (legacy) BIOS checks bootable devices for a boot signature, a so called magic number. The boot signature is in a boot…

Mock an Observable Interface

August 1, 2016Categories: Software, Tutorial
TL;DR: Use a doAnswer() with a new Answer<Observable<Type>>() if you have to mock observables. Today I wrote my first test where I had to mock an observable interface: where the User model is: Solution In my test class (named UserDatabaseTest ), I first mocked the interface: Then, my setup…

Fix "Multiple dex files define L..." Errors

July 22, 2016Category: Software
Today I got an error when building the APK: Multiple dex files define L/... My scenario is that of a project with 2 modules: a core and an app . Both modules use a plugin named androiddevmetrics , which generate some code, including a class which has the same signature in both modules. The…

Mirror a Website with WGet

June 10, 2016Category: Software
TL;DR: if you want to mirror a site where you need to authenticate, you need to do it in two steps. In the process of testing my app, I needed a mirror of the website I'm using. Since the website has authentication (via a form), the mirroring process has 2 parts. First part is to log in and get the…

Strip HTML tags in python

June 5, 2016Categories: Software, Tutorial
Note: This is a post transferred from Laurii for historical and consolidation purposes. A common problem I have to deal with quite often is to remove all HTML tags from a document. While this is easy for XML (well formatted etc.) and you could do it by hand with a regexp, HTML has a bit more…

Outlook VBA: Iterate recursively over folders

May 31, 2016Categories: Software, Tutorial
Note: This is a post transferred from Laurii for historical and consolidation purposes. As part of the program I've started , I had to perform a recursive walking of all sub-folders from a starting point in a .pst file. Code looks like this: This doesn't do too much... It selects a folder…

Cascade get value from dictionary in Python

May 31, 2016Categories: Software, Tutorial
Several times I've been faced with the problem: Get a value from a dictionary. If the key is not present, then get from another key. Normally, the implementation would go like this: Or, even worse, with try-catch statements. That's fine if the sequence is fixed, but what if you want to have some…

Outlook VBA: Write to a file

May 30, 2016Categories: Software, Tutorial
Note: This is a post transferred from Laurii for historical and consolidation purposes. I'm not a master in VB (I hate it actually) not in VBA, but it;s quicker to write something like a hack in VBA for outlook than in C#. So, here's a tiny snapshot on how to write to a file in Outlook (my…
PreviousNext

All categories