Quantcast
Channel: Benoît Vidis » Programming
Browsing all 10 articles
Browse latest View live

Overriding static members: Nonsense?

Am I really the only one to be tempted to sometimes write absurd thigs like this?! abstract class MyAbstractClass { public static abstract string MyString { get; } } Of course it is absurd. At least in...

View Article



Image may be NSFW.
Clik here to view.

jQuery tags plugin

I was looking for a little plugin to handle the tags input in a nice way, like for instance tumblr does and could not find any. It might very well be because I did search hard enough but decided to...

View Article

Image may be NSFW.
Clik here to view.

Where an interpreted language can be useful – Apply a function to backward...

We all know the preg_replace function. I have been using it for years and never noticed its behaviour when it is associated with the “e” modifier. Just take a look at this piece of code: echo...

View Article

Image may be NSFW.
Clik here to view.

Lazy loading with asychronous calls – A design pattern proposal

When using regular OOP, it is often a good idea to retrieve the data as last as possible, only if and when it is needed. This what is called lazy loading. class MyClass { private ABigObject _myVar;...

View Article

Image may be NSFW.
Clik here to view.

I’d rather not have to read over my fellow’s shoulder

I generally agree with Agile principles. For the most part, I have not had the chance to put them in practice yet but most of them just seem to be the right thing to do. I must admit I am still very...

View Article


Image may be NSFW.
Clik here to view.

How many poppies on the photograph?

Maybe you already have had to count a large number of items on a picture. I you have, you know it was tedious and needed quite a lot of focus for an apparently basic task. So, I put online a very basic...

View Article

Image may be NSFW.
Clik here to view.

How to capture the KeypressEvent on a GTK Custom Widget

Let’s say you want for instance to change the cursor icon when the user presses the control key on your widget. This apparently simple task almost drove me crazy. Subscribing to the KeyPressEvent is...

View Article

Image may be NSFW.
Clik here to view.

Keep your 2 barrels of Mootools, I am keeping my barrel of jQuery

As I was latetly assigned to a new project at my new job, the question of the choice of the javascript framework to use raised. My fellow co-workers were used to Mootools and our talented HTML...

View Article


Inject JQuery – bookmarklet

If you want to inject jquery in a page from your browser, you can use the following bookmarlet. Just drag & drop the following link to you bookmark address: Inject jQuery. NB: jQuery is then...

View Article


Image may be NSFW.
Clik here to view.

Convert pdf to cbr

#!/bin/sh   mkdir "`basename \"$1\" .pdf`" cp "$1" "`basename \"$1\" .pdf`/bd.pdf" cd "`basename \"$1\" .pdf`" pdftohtml -nodrm bd.pdf   for f in *.jpg do convert -compress JPEG2000 -quality 75...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images