Stupid code tricks

André Ourednik, Wednesday, March 22, 2017

A histogram gives you counts of elements within spefic ranges of a variable, represented as bars. Sometimes, you want to see more then bars. The following code allows you to represent a second variable with a color shade:

André Ourednik, Sunday, November 29, 2015

The digital height model DHM25 is a set of data representing the 3D form of the earth’s surface without vegetation and buildings. It is essentially based on the Swiss National Map 1:25 000. Years ago, when Swisstopo was called Bundesamt für Landestopographie, they published this data in their home-made format called MMBLT, stored in files […]

Category: Stupid code tricks, Tools  | Tags: , , ,  | Leave a Comment
André Ourednik, Wednesday, December 5, 2012

ArcMap has the bad habit of forgetting to unlock files that you remove from a project. I have lost hours, as the only solution to remove unwanted locks seemed to be shutting down ArcMap, modifying the file, then restarting ArcMap (that takes at least a minute to load each time). Nothing seemed to help until […]

André Ourednik, Wednesday, August 8, 2012

If you’ve changed your standard .tex file editor to Notepad2 or Notepad++, chances are that the contextual menu entry “Create New > Document file” has disappeared. To restore it, just save the following code as a .reg file and run it (thanks to Archos alias Limneos for posting the code on a SevenForums):

PS: […]

André Ourednik, Wednesday, August 8, 2012

I want Windows 7 to sort my files alphabetically, and I mean alphanumerically, from 0 to z, in ASCII order. Windows 7 acts way too smart sorting files by names to my taste. On more ancient versions of Windows (e.g. Windows 2000) the sorting order would be something like this: Ie4_01 Ie4_128 Ie401sp2 Ie5 Ie501sp2 […]

André Ourednik, Monday, April 11, 2011

Changing the language of a whole presentation in MS PowerPoint can be tedious. Especially when you translate your slides. You easily end up with a mix of languages on a number of slides. You notice, then, that it is not possible to select the main one: the language button (on the bottom bar) is simply […]

André Ourednik, Thursday, August 12, 2010

André Ourednik, Thursday, August 12, 2010

To stock ‘machine readable’ information about a table cell use the abbr tag: Useful for example when you try to give jQuery a handle on specific table cells when id and class tags are already in use. The ‘abbr’ attribute is an official attribute of the td tag in HTML 4.01/XHTML 1.0 DTD in compliance […]

André Ourednik, Thursday, August 12, 2010

Sometimes, stuff gets stuck in Windows trash. Mouse-click trash emptying doesn’t work any more. If that happens, use the following DOS code in the command line:

If something’s really stuck in the recyler, you will get the following error message (or equivalent in your operationg system installation language):

Ignore that message. The trash […]

André Ourednik, Thursday, August 12, 2010

Trying to call R from, say Java?

returns an error as the Windows command line has trouble interpreting spaces. Use this call instead: