Leaves of code: We need a programming language for the rest of us: "I was struck recently while I was at the grocery store with my girlfriend, ruffling through stacks of fresh fruits and vegetables to find all the ingredients for a meal. Why can’t coding be more like this? I thought, more like picking ingredients for a meal. Learning C is like learning the genetic sequencing of a tomato. While it certainly is required for the tomato to exist, I don’t need to be familiar with it to slice it and put it together with a list of ingredients. It’s outside the resolution of knowledge required for preparing a meal.
On top of that, if every would-be chef needed to know the genetic sequence of a tomato before he or she constructed a meal, they’d probably never get around to the cooking. In fact, they’d probably never become a chef in the first place, because they, naturally, would not have been a very good geneticist."
Tuesday, June 14, 2011
Monday, June 13, 2011
Tuesday, June 07, 2011
How to accidentally kill your CI build time « Schneide Blog
How to accidentally kill your CI build time « Schneide Blog: "In order to have the build time available (e.g. to show in an “about” box), we use a preprocessor symbol like REVISION_DATE which gets filled in a CMakeLists.txt file. The whole thing looks like this:
1
...
2
EXEC_PROGRAM(date ARGS '+%F_%T' OUTPUT_VARIABLE REVISION_DATE)
3
...
4
ADD_DEFINITIONS(-DREVISION_DATE=\'${REVISION_DATE}\')
5
...
Since the beginning of the time these lines of CMake code lived in a small sub-sub-..-directory with little to no incomming dependencies. Then, at some point, it became necessary to have the REVISION_DATE symbol at some other place, too, which led to a move of the above code into the CMakeLists.txt file of the main package."
1
...
2
EXEC_PROGRAM(date ARGS '+%F_%T' OUTPUT_VARIABLE REVISION_DATE)
3
...
4
ADD_DEFINITIONS(-DREVISION_DATE=\'${REVISION_DATE}\')
5
...
Since the beginning of the time these lines of CMake code lived in a small sub-sub-..-directory with little to no incomming dependencies. Then, at some point, it became necessary to have the REVISION_DATE symbol at some other place, too, which led to a move of the above code into the CMakeLists.txt file of the main package."
Stand-alone code for numerical computing
Stand-alone code for numerical computing: "Sometimes you need a little code to do some scientific computing and you don't want to take on a dependence to a huge and possibly unfamiliar library. This page is an index to code snippets in multiple languages that solve that problem.
The software listed here has been designed to minimize dependencies, minimize complexity, and maximize transparency. That sometimes means sacrificing efficiency.
All code here is in the public domain. Do whatever you want with it, no strings attached. Use at your own risk."
The software listed here has been designed to minimize dependencies, minimize complexity, and maximize transparency. That sometimes means sacrificing efficiency.
All code here is in the public domain. Do whatever you want with it, no strings attached. Use at your own risk."
10 physical gestures that have been patented - io9
10 physical gestures that have been patented - io9: "It sounds crazy, but tech companies have been patenting physical gestures for almost two decades now. In a world ruled by touchscreens, Kinect, and Guitar Hero, these businesses don't want people making certain gestures without paying for it. Find out which gestures you're making that may be infringing somebody's patents."
Monday, June 06, 2011
Distributed Digital Music Archives & Libraries Lab | McGill University
Distributed Digital Music Archives & Libraries Lab | McGill University: "Diva.js (Document Image Viewer with AJAX) is a Javascript frontend for viewing documents, designed to work with digital libraries to present multi-page documents as a single, continuous item. Only the pages that are being viewed at any given time are actually present in the document, with the rest appended as necessary, ensuring efficient memory usage and high loading speeds. Written as a jQuery plugin, diva.js requires the jQuery Javascript library, along with several jQuery plugins and the jQuery UI, all of which are included. On the backend, the images will be served by IIPImage server after processing, and the image information will be sent, in JSON format, through an AJAX request by a PHP script (also included)."
Python: How to print a class or objects of class using print()? - Stack Overflow
Python: How to print a class or objects of class using print()? - Stack Overflow: "class Test:
def __init__(self, a, b):
self.a = a
self.b = b
def __repr__(self):
return '' % (self.a, self.b)
def __str__(self):
return 'From str method of Test: a is %s, b is %s' % (self.a, self.b)"
def __init__(self, a, b):
self.a = a
self.b = b
def __repr__(self):
return '' % (self.a, self.b)
def __str__(self):
return 'From str method of Test: a is %s, b is %s' % (self.a, self.b)"
gobject Functions
gobject Functions: "gobject.idle_add
def gobject.idle_add(callback, ...)
callback : a function to call when PyGTK is idle
... : optionals arguments to be passed to callback
Returns : an integer ID
The gobject.idle_add() function adds a function (specified by callback) to be called whenever there are no higher priority events pending to the default main loop. The function is given the default idle priority, gobject.PRIORITY_DEFAULT_IDLE. Additional arguments to pass to callback can be specified after callback. The idle priority can be specified as a keyword-value pair with the keyword 'priority'. If callback returns FALSE it is automatically removed from the list of event sources and will not be called again."
def gobject.idle_add(callback, ...)
callback : a function to call when PyGTK is idle
... : optionals arguments to be passed to callback
Returns : an integer ID
The gobject.idle_add() function adds a function (specified by callback) to be called whenever there are no higher priority events pending to the default main loop. The function is given the default idle priority, gobject.PRIORITY_DEFAULT_IDLE. Additional arguments to pass to callback can be specified after callback. The idle priority can be specified as a keyword-value pair with the keyword 'priority'. If callback returns FALSE it is automatically removed from the list of event sources and will not be called again."
Susam Pal: Compiler taking input while compiling
Susam Pal: Compiler taking input while compiling: "So, the code will have only one line: #include '/dev/stdin'. On Windows machine, CON represents the standard input, so: #include 'CON'"
Sunday, June 05, 2011
Subscribe to:
Posts (Atom)
