Skip to content

Content Tagged "decorator"

Page 1 of 1

Scan Decorated Classes in Typescript

December 21, 2016Categories: Software, Tutorial
TL;DR: Make the decorator set a property in the class and look for it. While trying my hand at writing an ORM, I had a problem of initialising the database through a dummy instantiation of some models, without running an explicit command. In java, I can use code generation to provide a list of…

Braindump: Use a Decorator to Time your Python Function

July 4, 2014Category: Software
In the programs I write these days I use timing methods to profile the code, mainly because I find it easier to split and sum deltas based on functions. For example, I have a script that loads an XML file, parses it into a relational-ish layout, and uploads the layout into a database. Therefore, I…

All tags