Skip to content

Content classified under "Software"

Page 16 of 21

BAT Files: Execute Multiple Commands in a Loop

October 3, 2014Category: Software
One of the tasks the other day was to load a large DB organised by year. The most efficient way was to loop through a sequence of years and execute the loader for each one. The first iteration I ended with was: This means: For years from 1996 to 1998, with an increment of one, execute my load.bat…

Postgres: Show Schema Sizes in a Database

October 2, 2014Category: Software
While loading a large database from files to a Postgres schema, I found very useful to know how much space on disk it actually occupies (just in case I need to re-size the disk). I found this answer online: Which results in a list like: ] HTH, PS: All credit goes to this StackOverflow answer !

IntelliJ: Change the default cache location (e.g. .IntelliJIdeaXX)

September 30, 2014Category: Software
Everything started from a problem I had with PyCharm, where it would create a ".PyCharm30" directory in my home, which would end up being about 300Mb, with a lot of files (2000+files, approx 200 directories). This gets taxed since my home dire gets synced at login/logout with a networked drive…

Android java.lang.VerifyError and Boilerplate code

August 19, 2014Category: Software
TL;DR: Change the java version compatibility in your gradle file (see below) or remove Hugo references from your e.g. "debug" code in Velcro. The other day I discovered a bunch of template-based application generators for android. While they are very interesting and apply some of the best…

ELI5 - Injection Concepts

August 9, 2014Category: Software
TL;DR: Injection is the process to automatically initialise variables (or parameters) when building an instance. I'we tried to wrap my head around dagger for a few days until I realised I was missing actually the concept of injections in java (to my defense, I stopped using recent java releases…

ELI5 - Android and Java Libraries and Concepts

August 8, 2014Category: Software
These days I'm learning how to build an Android application. After building a step-by-step simple app (like a " Hello world! ", but with lists and fragments), I wanted to go further and build something more complex, using afree tamplate. There are a lot of boilerplate templates for an app, but…

Android - Speed up Building with Android Studio and Gradle

August 5, 2014Category: Software
I've noticed that building a small application with gradle is slow (in my case because I'm only starting with Android development and I compile stuff way too often). One of the things I found online was a way to speed up building by using the gradle daemon instead. From daemon's documentation…

Python Tutorial - Guess a Number Game

August 1, 2014Category: Software
A while ago I had a problem to solve: Write a program to guess a number between 1 and 1,000,000 in python. This is a simple learning program, done in high school or university, particularly when learning a programming language. The Problem The problem can be translated in the following parts…

Gradle and Proxy Authentication in Android Studio

July 28, 2014Category: Software
Update : This is obsolete as Android Studio is going to eliminate JVM arguments for gradle. See this post for a more future-proof approach . The other day I did an exercise to install Android Studio ("AS" henceforth) (0.8.4 at the moment of writing) and create a project with gradle in an…

Load a CSV File with Header in Postgres via Psycopg

July 5, 2014Category: Software
My task is to create a script to load a bunch of files into a DB model. The files are CSV, with quoted strings and headers. Postgres has a COPY command which I find fabulous for loading data. unfortunately, the psycopg implementations copy_from() , copy_to() and copy_expert() have very few examples…

All categories